本地訪問虛擬機unbuntu項目

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".
初步分析了一下錯誤原因是:安全異常,需要修改httpd-xampp.conf.這個文件在:/opt/lampp/etc/extra下。確定了需要改的地方。不過,網上上的解決方法都是這樣的:
方法1:
"^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
Order deny,allow
Deny from all
Allow from ::1 127.0.0.0/8 \
fc00::/7 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16\
fe80::/10 169.254.0.0/16
ErrorDocument 403/error/XAMPP_FORBIDDEN.html.var
將Deny from al註釋掉
#Deny from all
然後重新啓動apache。我在這個文件中沒找到這行,排除。

方法2:
 1、你需要按上邊更改,註釋掉那句話:
#Deny from all
2、像下面這樣修改:(加入加粗的字)
"/opt/lampp/phpmyadmin">
AllowOverride AuthConfig Limit
Order allow,deny
Allow from all
Require allgranted
我發現配置文件裏已經有上面的文字了,這時發現跟別人不一樣的地方

#        Require local
        ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
正解方法是注掉本地訪問這行,如下:      
#Require local
     最後,重啓啓動lampp,OK了,哈哈

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