wamp localhost访问设置
电脑系统升级为win10 后就不能访问本地配置的网站域名了。
访问结果如图:
You don't have permission to access / on this server.
现在整理一下wamp 安装后的配置:
1. 先确保打开wamp
2. 绑定host域名 : 127.0.0.1 localhost
3. 配置vhost:
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot "E:/wamp/www/"
ServerName localhost
ErrorLog "logs/dummy-host2.example.com-error.log"
CustomLog "logs/dummy-host2.example.com-access.log" common
</VirtualHost>
4. 配置httpd.conf文件:
//找到
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
allow from all
</Directory>
//改为
<Directory />
Options Indexes FollowSymLinks
AllowOverride None
</Directory>
//如果还不能访问,继续往下看
//找到带有路径的Directory
//将
Deny from all
Allow from 127.0.0.1
//改为
Allow from all
由于配置了php后,这里的“Deny from all”已经拒绝了一切连接。把该行改“allow from all”,修改后的代码如下,问题解决
如图:
改为:
加#号的可以忽略;
重启apache试试,应该就好了哦。