1

I just set up phppgadmin on my webserver (a Debian Jessie) and I configure Apache this way to access it:

<Virtualhost *:80>
    ServerName pga.mydomain.com
    DocumentRoot /usr/share/phppgadmin

    <Directory /usr/share/phppgadmin>
        DirectoryIndex index.php
        Order deny,allow
        Allow from all
    </Directory>
</Virtualhost>

It is rightly in its place in /etc/apache2/site-available and I enabled it with a2ensite. (edit: I did exactly the same for phpmyadmin and it works perfectly.)

However, when I try to access it through http://pga.mydomain.com, I get a 403 Forbidden error. If I take a look at my Apache log, I find the following:

[authz_core:error] [pid 32700] [client xxx.xxx.xxx.xxx:36059] AH01630: client denied by server configuration: /usr/share/phppgadmin/

It seems to me that the Allow from all should let me access it even remotely. I tried different combinations of permissions, neither of them working. I see this error floating around a lot but I did not find a satisfactory solution yet. Any advice would be greatly appreciated!

1

I continued to fiddle with the Apache configuration and I replaced:

<Directory /usr/share/phppgadmin>
    DirectoryIndex index.php
    Order deny,allow
    Allow from all
</Directory>

by

<Directory /usr/share/phppgadmin>
   Require all granted
</Directory>

did the trick.

I am always not completely clear about these kind of details with Apache config that seems to be the same or about the same but give completely different results in the end... Any enlightment on this point would be appreciated!

  • For those who are confused like me, I found this question where the first answer (and the link in it) helped me to understand (long story short: first syntax (failing) is obsolete, second (working) is the new syntax for Apache 2.4+). – MBR Aug 18 '17 at 16:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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