首页 > 数据库技术 > 详细

xampp下新增virtualhost出现access denied

时间:2015-11-17 19:11:45      阅读:358      评论:0      收藏:0      [点我收藏+]

在xampp新增了一个virtualhost:

<VirtualHost 127.0.0.11:80>  
   DocumentRoot E:/workspacePHP/personalSite
   ServerName 127.0.0.11:80  
</VirtualHost>  

<Directory "E:/workspacePHP/personalSite">  
   Options Indexes FollowSymLinks 
   AllowOverride All 
   Order Allow,Deny
   Allow from all  
</Directory>
然后访问http://127.0.0.11:80,出现403禁止访问错误,google之后发现httpd.conf文件有默认的配置,
<Directory "D:/xampp/cgi-bin">
    AllowOverride All
    Options None
    Require all denied
</Directory>

修改require为all granted即可。

<Directory "D:/xampp/cgi-bin">
    AllowOverride All
    Options None
    Require all granted
</Directory>

或者在新增的Directory增加require all granted:

<Directory "E:/workspacePHP/personalSite">  
   Options Indexes FollowSymLinks 
   AllowOverride All 
   Order Allow,Deny
   Allow from all  
   Require all granted
</Directory>

遇到的问题,此处mark一下。

本文出自 “绵之学习笔记” 博客,谢绝转载!

xampp下新增virtualhost出现access denied

原文:http://chenmg.blog.51cto.com/3039876/1713533

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!