要禁止從網絡訪問,位於xampp-folder\apache\conf\extra\httpd-xampp.conf
更改此開放httpd-xampp.conf
:
<LocationMatch "^/(?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
</LocationMatch>
要這樣:
<LocationMatch "^/(?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 \
fe80::/10 169.254.0.0/16
ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</LocationMatch>
不要忘了重新啓動Apache。現在http://localhost/phpmyadmin
將導致403 Forbidden錯誤。
欲瞭解更多信息閱讀你可以閱讀http://www.hellothupten.com/2013/11/24/block-access-to-phpmyadmin-from-lan-network-on-xampp/
你有沒有嘗試改變\的conf \額外\的httpd-xampp.conf? – newTag
不完全,但我不得不完全註釋允許來自部分,只添加=>允許來自:: 1感謝您的幫助.. –