解決 XAMPP 出現 A今天安裝了XAMPP 試了下,增加虛擬主機時出現沒權限,apache配置文件httpd.conf的allow屬性,把下圖中的文字注釋掉:
然后公開於外網出現以下錯誤,也很容易,但是記錄下,也許別的工具也會出現類似的錯誤,但是沒這么明顯的提示也不一定,僅當參考。
Access forbidden!
--------------------------------------------------------------------------------
New XAMPP security concept:
Access to the requested object is only available from the local network.
This setting can be configured in the file “httpd-xampp.conf”.
--------------------------------------------------------------------------------
If you think this is a server error, please contact the webmaster.
Error 403
test.com
Apache/2.4.1 (Win32) OpenSSL/1.0.0g PHP/5.4.0
意思也就是XAMPP的安全配置文件阻止,於是去httpd-xampp.conf這個文件中看看吧,怎么看?如下圖:
ccess forbidden! 錯誤
點擊之后是以記事本打開的,翻到最底部可以看到 New XAMPP security concept ,如此也就容易改了吧,默認的是使其只能內網訪問,改為自己想要的結果吧。這里以全網開放為例,如圖……
修改后,重啟服務器即可。