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~
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章