使用新的apache 2.2.4出现下面的提示信息:
You don‘t have permission to access the requested directory. There is either no index document or the directory is read-protected.
If you think this is a server error, please contact the webmaster.
是由于没有授权造成的,设置方法是在虚拟主机配置中添加
注意,一定是需要在<Directory "D:/xampp/www/"> 里面添加的,如果是下面的配置,就会造成apache启动失败
正确的代码如下:
<VirtualHost *:80> ##ServerAdmin webmaster@dummy-host.example.com DocumentRoot "D:/xampp/www/" ServerName www.***.com #ServerAlias www.dummy-host.example.com #ErrorLog "logs/dummy-host.example.com-error.log" #CustomLog "logs/dummy-host.example.com-access.log" common #Options Indexes FollowSymLinks Includes ExecCGI <Directory "D:/xampp/www/"> Require all granted </Directory> </VirtualHost>
原文:http://blog.csdn.net/zhumin518/article/details/18989883