2016-12-04 4 views
1

私はphpmyadminでのログインに関する質問があります。phpmyadminログインのみローカルエリアネットワーク

私は、ローカルエリアネットワークのページにのみ、phpmyadminのログを表示したいと考えています
接続PCと携帯電話。

ここは私の情報です。

のCentOS 7.2
phpmyadminの4.4.15.8
のApache 2.4.6
PHP 7.0.13
MariaDB 10.1.19
私のサーバーのpravate IPアドレスが私のroutorが192.168.0.1
ある192.168.0.12
ですここで

が私の現在のコードである(すべてのPCとデバイスがphpadminログインページを見ることができます。)
/etc/httpd/conf.d/phpMyAdmin.conf

<Directory /usr/share/phpMyAdmin/> 
 
    AddDefaultCharset UTF-8 
 

 
    <IfModule mod_authz_core.c> 
 
    # Apache 2.4 
 
    <RequireAny> 
 
     Require all granted 
 
    </RequireAny> 
 
    </IfModule> 
 
    <IfModule !mod_authz_core.c> 
 
    # Apache 2.2 
 
    Order Deny,Allow 
 
    Deny from All 
 
    Allow from 127.0.0.1 
 
    Allow from ::1 
 
    </IfModule> 
 
</Directory> 
 

 
<Directory /usr/share/phpMyAdmin/setup/> 
 
    <IfModule mod_authz_core.c> 
 
    # Apache 2.4 
 
    <RequireAny> 
 
     Require ip 127.0.0.1 
 
     Require ip ::1 
 
    </RequireAny> 
 
    </IfModule> 
 
    <IfModule !mod_authz_core.c> 
 
    # Apache 2.2 
 
    Order Deny,Allow 
 
    Deny from All 
 
    Allow from 127.0.0.1 
 
    Allow from ::1 
 
    </IfModule> 
 
</Directory> 
 

 
# These directories do not require access over HTTP - taken from the original 
 
# phpMyAdmin upstream tarball 
 
# 
 
<Directory /usr/share/phpMyAdmin/libraries/> 
 
    Order Deny,Allow 
 
    Deny from All 
 
    Allow from None 
 
</Directory> 
 

 
<Directory /usr/share/phpMyAdmin/setup/lib/> 
 
    Order Deny,Allow 
 
    Deny from All 
 
    Allow from None 
 
</Directory> 
 

 
<Directory /usr/share/phpMyAdmin/setup/frames/> 
 
    Order Deny,Allow 
 
    Deny from All 
 
    Allow from None 
 
</Directory>

答えて

0

変更のApache 2.4のラインとphpMyAdminのディレクトリお住まいの地域のネットワークによって:

<Directory /usr/share/phpMyAdmin/> 
    AddDefaultCharset UTF-8 

    <IfModule mod_authz_core.c> 
    # Apache 2.4 
    <RequireAny> 
     Require local 
     Require ip 192.168.1 #HERE put your network address 
    </RequireAny> 
    </IfModule> 
</Directory> 

それとも

Require local 
Require ip 192.168.1.100 
Require ip 192.168.1.101 
も、より具体的にします
関連する問題