在httpd.conf的文件末尾加上 Include /usr/local/apache/conf/vhost.conf 同时在 /usr/local/apache/conf目录下,vi vhost.conf 内容如下:
NameVirtualHost 192.168.1.231:80 ServerName ServerName DocumentRoot "/usr/local/apache/www1" Alias /cs "/usr/local/apache/htdocs/phpmyadmin/" allow from all
DirectoryIndex index.php
ServerName DocumentRoot "/usr/local/apache/htdocs" allow from all