Sunday, November 18, 2012

XAMPPにローカルホスト以外からアクセスする

あるコンピュータでXAMPPをつかって、ページを立ち上げ、同じネットワーク内にある他のデバイスから接続すると以下の様なエラーに合った。

New XAMPP security concept
Access to the requested directory is only available from the local network.

以下が、回避法
1. XAMPPルートフォルダ\apache\conf\extra以下にある、httpd-xampp.confファイルを開く
2. 以下の部分を見つける


# Close XAMPP sites here
<LocationMatch "^/(?i:(?:xampp|licenses|phpmyadmin|webalizer|server-status|server-info))">
    Order deny,allow
    Deny from all
    Allow from ::1 127.0.0.0/8 
    ErrorDocument 403 /error/HTTP_XAMPP_FORBIDDEN.html.var
</LocationMatch>


3. Deny from all をAllow from allに変更する

4. Apacheを再起動すれば、アクセスできるはず。

No comments:

Post a Comment