CentOS phpmyadmin folder forbidden

19,080

This works. Centos 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>
Share:
19,080

Related videos on Youtube

rakcode
Author by

rakcode

BY DAY: Web &amp; Graphic Designer @ SuperSeva Services Pvt. Ltd BY NIGHT: Learning New Web Technologies and Code some templates for learning Purposes. FOR FUN: YouTube, Facebook, Whatsapp, Movies, Songs, etc....

Updated on September 18, 2022

Comments

  • rakcode
    rakcode over 1 year

    installed php5,apache2,LAMP, PHPMyAdmin but if I type my IP and PHPMyAdmin like this http://__my_IP__/phpmyadmin it is showing the error

    Forbidden
    You don't have permission to access /PHPMyAdmin/ on this server.

    I edited /etc/httpd/conf.d/phpmyadmin.conf this file also added my IP address and allow to my IP address, still it is showing above error,

    my phpmyadmin.conf file is like this now

    # 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
    

    how can I access PHPMyAdmin folder, so that I can manage database easily, I'm using Redhat Linux 7.3, all packages are updated!

    please help me!

    • Admin
      Admin about 7 years
      Which user is running apache? Does the user have access rights to /usr/share/phpMyadmin?
  • rakcode
    rakcode about 7 years
    no sir, same error! I tried this also
  • Thalys
    Thalys about 7 years
    Comments are not for extended discussion; this conversation has been moved to chat.