打开httpd.conf文件,找到:
<Directory /> Options FollowSymLinks AllowOverride None Order deny,allow Deny from all Satisfy all </Directory>
修改成:
<Directory /> Options FollowSymLinks AllowOverride None Order deny,allow allow from all Satisfy all </Directory>
找到:
# Virtual hosts # Include conf/extra/httpd-vhosts.conf
修改成:
# Virtual hosts Include conf/extra/httpd-vhosts.conf
打开conf/extra目录下的httpd-vhosts.conf文件:
按如下示例修改:
<VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot "E:/WEB" ServerName localhost ServerAlias localhost ErrorLog "E:/WEB/logs/error_log" CustomLog "E:/WEB/logs/access_log" common </VirtualHost>
<VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot "E:/WEB/test/www" ServerName localhost ServerAlias test ErrorLog "E:/WEB/test/logs/error_log" CustomLog "E:/WEB/test/logs/access_log" common </VirtualHost>
然后修改你的hosts文件(C:\WINDOWS\system32\drivers\etc)
把test指向127.0.0.1
Ok.
http://localhost/
和
http://test
分别指向两个不同的文件!
汗。。。弄了一上午,才配好。
|