最近本地使用bootstrap搭建公司官网,使用到WampServer集成环境访问localhost运行网站时出现提示:
You don't have permission to access / on this server.
问题的解决:
修改http.conf中的默认配置。
第一处:
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
</Directory>
第二处:
# onlineoffline tag - don't remove
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
</Directory>
将上述两处的Deny from all 改为:Allow from all ,然后重新启动所有服务。
如果访问phpmyadmin时候,出现You don't have permission to access /phpmyadmin/ on this server的提示,则打开xx:/wamp/alias/phpmyadmin.conf修改为:
<Directory "c:/wamp/apps/phpmyadmin3.5.1/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Deny,Allow
Allow from all
Allow from 127.0.0.1
</Directory>