打开httpd.conf 将<Directory />
</Directory>的内容替换成
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
也就是
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
</Directory>
vhost配置:
<VirtualHost *:80>
DocumentRoot "E:/wamp/www"
ServerName localhost
<Directory "E:/wamp/www">
Options Indexes FollowSymLinks
Order allow,deny
Allow from all
AllowOverride All
</Directory>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "E:/wamp/dwz"
ServerName www.dwz.com
<Directory "E:/wamp/dwz">
Options Indexes FollowSymLinks
Order allow,deny
Allow from all
AllowOverride All
</Directory>
</VirtualHost>
hosts配置:
127.0.0.1 localhost
127.0.0.1 www.dwz.com
wamp报错You don't have permission to access on this server