2017-04-25 3 views
4

私はIPアドレスを使用して別のPCにXAMPPのphpMyAdminのにアクセスしようとすると、私はこのエラーを取得:XAMPP - 要求されたオブジェクトへのアクセスは、ローカルネットワークでしか入手できない

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".

私は解決策を探していましたhttpd-xampp.confファイルを変更するような提案がたくさん見つかりました。問題は、私のhttpd-xampp.confファイルには、このようなブロックが含まれていませんが、私は、ファイルIの最後にそれを追加しようということである

<LocationMatch "^/(?i(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))"> 
    Order deny,allow 
    Allow from all 
    ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var 
</LocationMatch> 

1)オプションは、このような<LocationMatch>ブロックを変更することでしたそれでも同じエラーが発生します。

2)オプションは、次のよう<Directory "C:/xampp/phpMyAdmin">を変更することでした:

<Directory "C:/xampp/phpMyAdmin"> 
    AllowOverride AuthConfig Limit 
    Order allow,deny 
    Allow from all 
    Require all granted 
    ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var 
</Directory> 

それとも

<Directory "C:/xampp/phpMyAdmin"> 
    AllowOverride AuthConfig Limit 
    Order allow,deny 
    Allow from all 
    ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var 
</Directory> 

それとも
<Directory "C:/xampp/phpMyAdmin"> 
    AllowOverride AuthConfig Limit 
    Require all granted 
    ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var 
</Directory> 

この

のいずれかの問題を解決しませんでした。まだ同じエラーが発生しています。

P.S.私は毎回Apacheを再起動しています!

誰かが紛失している可能性がありますか?

+0

同じ設定でApache 2.2とApache 2.4の両方の構文を使用しないでください – RiggsFolly

+0

私は一度に1つずつ使用しますが、まだエラーがあります –

+0

オプション2にはありません。 'Order allow、deny All from Allow'(Apache 2。2構文)OR 'Require all'(Apache 2.4構文) – RiggsFolly

答えて

10

私はそれを修正しました。 に移動してください:

<Directory "C:/xampp/phpMyAdmin"> 
    AllowOverride AuthConfig 
    Require local 
    ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var 
</Directory> 

し、以下のようにすべての内容を変更します。

<Directory "C:/xampp/phpMyAdmin"> 
    AllowOverride AuthConfig Limit 
    Order allow,deny 
    Require all granted 
    Allow from all 
</Directory> 
+0

秘密が "ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var"を削除しているようです。 –

+0

素晴らしい作品です! – Dilip

1

何が私のために働いていないが、以下のものが最高だった:

1)を開き

httpd-xampp.conf

にあります。

/opt/lampp/etc/extra/

2)検索<Directory "/opt/lampp/phpmyadmin">

3)今、ちょうどすべてが)

4の前に付与された要求を追加だから、コードは次のようになります今、ようやくとXAMPPを再起動します
<Directory "/opt/lampp/phpmyadmin"> AllowOverride AuthConfig Limit Order allow,deny Allow from all Require all granted </Directory>

5)このこのコマンド/ opt/lampp/lampp restart

これは完了しました。

xamppでも動作します。 :)

関連する問題