xmapp下Access forbidden的处理

在xampp\apache\conf\extra\httpd-vhosts.conf中,之前的配置是这样的:

<VirtualHost *:80>
    ServerAdmin [email protected]
    DocumentRoot "F:/code/study/php"
    ServerName www.aaa.com
    ServerAlias www.dummy-host.example.com
    ErrorLog "logs/dummy-www.aaa.com-error.log"
    CustomLog "logs/www.aaa.com-access.log" common
</VirtualHost>
启动xmapp的apache之后,访问提示403 access forbidden

这种情况下,需要修改下这里的配置为:

<VirtualHost *:80>
	<Directory "F:/code/study/php">
		Options Indexes FollowSymLinks Includes ExecCGI
		AllowOverride All
		Require all granted
	</Directory>
    ServerAdmin [email protected]
    DocumentRoot "F:/code/study/php"
    ServerName www.aaa.com
    ServerAlias www.dummy-host.example.com
    ErrorLog "logs/dummy-www.aaa.com-error.log"
    CustomLog "logs/www.aaa.com-access.log" common
</VirtualHost>
重启xmapp的apache,访问ok~

你可能感兴趣的:(xmapp下Access forbidden的处理)