![CentOS phpmyadmin 폴더는 금지되어 있습니다.](https://rvso.com/image/1520692/CentOS%20phpmyadmin%20%ED%8F%B4%EB%8D%94%EB%8A%94%20%EA%B8%88%EC%A7%80%EB%90%98%EC%96%B4%20%EC%9E%88%EC%8A%B5%EB%8B%88%EB%8B%A4..png)
php5,apache2,LAMP, PHPMyAdmin을 설치했지만 이렇게 IP와 PHPMyAdmin을 입력하면http://__my_IP__/phpmyadmin오류를 보여주고 있어요
금지됨
이 서버의 /PHPMyAdmin/에 액세스할 수 있는 권한이 없습니다.
편집했습니다/etc/httpd/conf.d/phpmyadmin.conf이 파일은 또한 내 IP 주소를 추가하고 내 IP 주소를 허용하지만 여전히 위의 오류가 표시됩니다.
내 phpmyadmin.conf 파일은 지금 이렇습니다
# phpMyAdmin - Web based MySQL browser written in php
#
# Allows only localhost by default
#
# But allowing phpMyAdmin to anyone other than localhost should be considered
# dangerous unless properly secured by SSL
Alias /phpMyAdmin /usr/share/phpMyAdmin
Alias /phpmyadmin /usr/share/phpMyAdmin
<Directory /usr/share/phpMyAdmin/>
AddDefaultCharset UTF-8
<IfModule mod_authz_core.c>
# Apache 2.4
<RequireAny>
Require ip 27.34.248.3
#Require ip ::1
</RequireAny>
</IfModule>
<IfModule !mod_authz_core.c>
# Apache 2.2
Order Deny,Allow
데이터베이스를 쉽게 관리할 수 있도록 PHPMyAdmin 폴더에 어떻게 액세스합니까? 저는 Redhat Linux 7.3을 사용하고 있으며 모든 패키지가 업데이트되었습니다!
도와주세요!
답변1
이것은 작동합니다. 센토스 7.
<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
Allow from All
</IfModule>
</Directory>
답변2
다음 구성을 시도해 보세요.
<Directory /usr/share/phpMyAdmin/>
AddDefaultCharset UTF-8
<IfModule mod_authz_core.c>
# Apache 2.4
<RequireAny>
Require ip 127.0.0.1
Require ip ::1
Require ip 27.34.248.3
</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
Allow from 27.34.248.3
</IfModule>
</Directory>
Apache 서비스를 다시 시작합니다.
systemctl restart httpd
답변3
phpmyadmin의 Apache 구성 파일을 변경해야 합니다.
위치는 /etc/httpd/conf.d/phpMyAdmin.conf입니다.
기본 구성은 다음과 같습니다.
<Directory /usr/share/phpMyAdmin/>
AddDefaultCharset UTF-8
<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>
다음으로 변경하세요.
<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
Allow from All
</IfModule>
</Directory>
명령을 사용하여 아파치를 다시 시작하십시오.
# service httpd restart
또는
# systemctl restart httpd.service