LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   permission denied for phpMyAdmin (https://www.linuxquestions.org/questions/linux-newbie-8/permission-denied-for-phpmyadmin-4175531885/)

vincix 01-22-2015 06:07 PM

permission denied for phpMyAdmin
 
Hi,

On Centos 7 I haven't been able to configure phpmyadmin. I've got Apache 2.4.6 and I've installed the latest phpmyadmin, both with yum.
I've changed all the 127.0.0.1 to my public ip and I've disabled the 'denied all' directives. This is how it looks:
Code:

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

<Directory /usr/share/phpMyAdmin/setup/>
  <IfModule mod_authz_core.c>
    # Apache 2.4
    <RequireAny>
      Require ip X.X.X.X
      Require ip ::1
    </RequireAny>
  </IfModule>
  <IfModule !mod_authz_core.c>
    # Apache 2.2
    Order Deny,Allow
    #Deny from All
    Allow from X.X.X.X
    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 All
</Directory>

<Directory /usr/share/phpMyAdmin/setup/lib/>
    Order Deny,Allow
    #Deny from All
    Allow from All
</Directory>

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

on /var/log/httpd/error_log:
Code:

AH01630: client denied by server configuration: /usr/share/phpMyAdmin
The httpd.conf hasn't been changed except this:
Code:

<Directory />
    AllowOverride none
    #Require all denied
    Allow from all
</Directory>

Normal access to my apache works fine (a default test page shows up)

SELinux is disabled and I've also stopped iptables to test it.

baldur_1 01-22-2015 09:36 PM

okay, just a quick thing, you have both a ipv4 ip address and an ipv6. i think that might be an issue but i know that ::1 is the lookback ip address for ipv6. i would comment that out unless you are using ipv6 ip addresses in which case i would put in the okay ip address for contact.

vincix 01-23-2015 03:50 AM

Quote:

Originally Posted by baldur_1 (Post 5305354)
okay, just a quick thing, you have both a ipv4 ip address and an ipv6. i think that might be an issue but i know that ::1 is the lookback ip address for ipv6. i would comment that out unless you are using ipv6 ip addresses in which case i would put in the okay ip address for contact.

Just for the sake of it I've made the changes by commenting out the IPv6 statements, but obviously it still doesn't work.

In my mind there can't be any connection. It works just fine on Centos 6.6 without changing any IPv6 directives. Moreover, ip6tables also works concomitently with iptables, but that doesn't seem to bother the latter in any way.

vincix 01-23-2015 08:26 AM

Thank you all, you've been amazing, like always! I'll try to preserve the tradition of obscurity :)

Habitual 01-23-2015 11:55 AM

So for future generations of LQ Visitors, please tell us what fixed it.

Thanks.


All times are GMT -5. The time now is 06:36 PM.