Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I need to modify the file /etc/httpd/conf.d/phpMyAdmin.conf in order to allow remote users (not only localhost) to login

# 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/">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride all
        Order Allow,Deny 
    Allow from all

<Directory /usr/share/phpMyAdmin/setup/>
   <IfModule mod_authz_core.c>
     # Apache 2.4
       Require ip
       Require ip ::1
   <IfModule !mod_authz_core.c>
     # Apache 2.2
     Order Deny,Allow
     Allow from All
     Allow from
     Allow from ::1

# 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 /usr/share/phpMyAdmin/setup/lib/>
    Order Deny,Allow
    Deny from All
    Allow from None

<Directory /usr/share/phpMyAdmin/setup/frames/>
    Order Deny,Allow
    Deny from All
    Allow from None

# 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>

When I get into phpmyadmin webpage, I am not prompted for user and password, before getting the error message: Forbidden: You don't have permission to access /phpmyadmin on this server. My system is Fedora 20

share|improve this question

2 Answers 2

Have a look at your httpd error log see if it has more specific info about the denial: /var/log/httpd/error_log

Also, if selinux is enforcing then try turning it off for testing:

$ sudo setenforce 0
$ getenforce

Have a look at your perms on /usr/share/phpMyAdmin as compared to /var/www/html

$ ls -ld /usr/share/phpMyAdmin /var/www/html

There's always the d'oh! check too...did you actually restart/reload the webserver after adding that config?

$ apachectl restart
share|improve this answer
/var/log/httpd/error_log says: [Thu May 29 08:55:36.517399 2014] [authz_core:error] [pid 1168] [client removed_ip] AH01630: client denied by server configuration: /usr/share/phpMyAdmin # ls -ld /usr/share/phpMyAdmin /var/www/html says drwxr-xr-x. 8 root root 4096 16 mag 22.21 /usr/share/phpMyAdmin drwxr-xr-x. 2 root root 4096 17 apr 20.32 /var/www/html –  Caterpillar May 29 '14 at 6:57

Add Allow from (replace w/ your IP address), don't forget to restart apache service httpd restart). feel free to take a look at mine I uploaded it for you to pastebin: http://pastebin.com/hvU3SGs1 (line 24, 42).

share|improve this answer
Allowing a single IP address is quite useless –  Caterpillar May 29 '14 at 6:54
@Caterpillar some might call it "security", but you can replace it with a range of IPs or you don't need that "security" take the whole block (Order,Allow,Deny) out. –  alexus May 29 '14 at 14:27

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.