Centos 7 when login to ip/phpMyAdmin shows 404 error

Viewed 303

I have installed apache 2.4,PHP 7.4, and PHPMyAdmin but when I login to IP/phpMyAdmin it is showing a 404 error

below is the configuration of phpMyAdmin.conf

                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 103.1.93.75/32
              Require ip 27.34.17.68

                      ###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 All
                      Allow from 103.1.93.75/32
                     Allow from 27.34.17.68
                     Allow from ::1
                    </IfModule>
                     </Directory>

can you help me to fix it?

1 Answers

you dont need deny all because youll be matching deny all, and you have the order to deny first too. below will work.

                     <IfModule !mod_authz_core.c>
                      # Apache 2.2
                       Order Allow,Deny
                      Allow from 103.1.93.75/32
                     Allow from 27.34.17.68
                     Allow from ::1
Related