apache 2.4.4

使用新的apache 2.2.4出现下面的提示信息:

Access forbidden!

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.


是由于没有授权造成的,设置方法是在虚拟主机配置中添加

apache 2.4.4_第1张图片


注意,一定是需要在  里面添加的,如果是下面的配置,就会造成apache启动失败

apache 2.4.4_第2张图片


正确的代码如下:


    ##ServerAdmin [email protected]
    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
	
		Require all granted
	


你可能感兴趣的:(服务器)