2017-03-18 1 views
0

이전에 여러 번 물어 보았지만 모든 대답이 동일하게 보이지 않으며 어느 것도 저에게 맞지 않습니다.phpmyadmin - 금지됨 -이 서버에서/phpmyadmin /에 액세스 할 수있는 권한이 없습니다.

로컬 호스트가 아닌 다른 곳에서 phpmyadmin GUI에 액세스하려고합니다.

"금지되었습니다 -이 서버에서/phpmyadmin /에 액세스 할 수있는 권한이 없습니다."라는 오류 메시지가 나타납니다. 브라우저에서

저는 CentOS7, Apache 2.4.6 및 phpMyAdmin-4.4.15.10-1.el7을 사용하고 있습니다.

<Directory /usr/share/phpMyAdmin/> 
    Order Allow,deny 
    Allow from all 
</Directory> 

<Directory /usr/share/phpMyAdmin/setup/> 
    Order Allow,deny 
    Allow from all 
</Directory> 

대부분의 사람들은 그냥 할 수있는 제안하는 것 :

<IfModule mod_authz_core.c> 
    # Apache 2.4 
    <RequireAny> 
     Require all granted 
    </RequireAny> 
</IfModule> 

또는 :

이 시도했습니다

<IfModule mod_authz_core.c> 
    # Apache 2.4 
    <RequireAny> 
     Require ip 192.168.1.6 
    </RequireAny> 
</IfModule> 

을하지만 그 중 어느 것도 작동하지 않습니다.

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

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

여전히 점점 :

당신은이 서버에// phpMyAdmin에 액세스 할 수있는 권한이 없습니다를 금지

이 현재 상태입니다.

편집 -

그냥 같은 추가 정보는, 나는 장애인 SELinux가 있고 올바른지는/usr/share/phpMyAdmin을에 확인 권한을했다.

편집 AGAIN- 지금이 시도했습니다

... 확실히 당신이 얻을 수있는만큼 기본이며, 아직 나는 여전히 오류가

<Directory /usr/share/phpMyAdmin/> 
     Require all granted 
</Directory> 

<Directory /usr/share/phpMyAdmin/setup/> 
     Require all granted 
</Directory> 

?

답변

0

결국 작동합니다. 주요 문제를 해결의 방법으로 얻고 있었다 한 번에 몇 가지 문제, ...

첫째, 편집 phpMyAdmin.conf ...

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

    <IfModule mod_authz_core.c> 
    # Apache 2.4 
    <RequireAny> 
     Require ip 192.168.1.6 
    </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/> 
    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> 

가 있었다 또한/usr/share/phpMyAdmin이 읽기 전용 일뿐만 아니라 아파치 사용자를 위해 실행 가능해야합니다. 난 그냥 재귀 또한 /etc/httpd/conf/httpd.conf 파일에 다음을 추가 할 필요가 777

에 chmodded :

<IfModule dir_module> 
    DirectoryIndex index.html index.php 
</IfModule> 

확인은/var/무엇을보고/아파치/error_log에 로그 당신의 특별한 실수는 각 단계에 있습니다.

3
<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 Allow,Deny 
    Allow from All 
    </IfModule> 
</Directory> 
+1

"모두 필요함"이 핵심이었습니다. – Teddy

관련 문제