V
V
Vanes Ri_Lax2016-04-07 08:47:58
linux
Vanes Ri_Lax, 2016-04-07 08:47:58

How to allow access from all IPs in phpmyadmin on CentOS?

Hello, I'm installing phpmyadmin on the server, everything seems to be set up, everything is fine. But I can not go to it, I open the address ip/phpmyadmin give 403 status. Please tell me what I need to write in the file:
/etc/httpd/conf.d/phpmyadmin.conf
to open access from all IPs?
Now it looks like this:

# 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 0.0.0.0/24
       Require ip ::1
     </RequireAny>
   </IfModule>
   <IfModule !mod_authz_core.c>
     # Apache 2.2
     Order Deny,Allow
     Deny from All
     Allow from 0.0.0.0/24
     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>

# This configuration prevents mod_security at phpMyAdmin directories from
# filtering SQL etc.  This may break your mod_security implementation.
#
#<IfModule mod_security.c>
#    <Directory /usr/share/phpMyAdmin/>
#        SecRuleInheritance Off
#    </Directory>
#</IfModule>

I tried to write like this: 0.0.0.0/24 I
reboot the server, it did not help.
Thank you very much in advance!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Z
zooks, 2016-04-07
@vanesxl

The problem is definitely not in closed IPs, because. By default, there is no limit. Most likely the index file is not set up, i.e. index.php.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question