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

Macbernie picture Macbernie · Apr 30, 2015 · Viewed 25.1k times · Source

I recently upgrade my server from Debian Wheezy to Debian Jessie (Debian 8). A lot of packages was updated and now, I don't have the right to access to phppgadmin from http://myIP/phppgadmin

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

I try a lot of thinks to solve the problem but absolutely nothing works...

In /etc/apache2/conf.d/phppgadmin:

Alias /phppgadmin /usr/share/phppgadmin

<Directory /usr/share/phppgadmin>

DirectoryIndex index.php
AllowOverride None

order allow,deny
# deny from all
allow from 127.0.0.0/255.0.0.0 ::1/128
allow from all

In /etc/apache2/sites-enabled/000-default.conf I add:

    <Directory /usr/share/phppgadmin/>
            Options Indexes FollowSymLinks MultiViews
            AllowOverride None
            Order allow,deny
            Allow from all
    </Directory>

I try to change the permissions of /usr/share/phppgadmin/, /var/www...

And I have the same message even if I uninstall the package phpgpadmin !

apt-get remove phppgadmin

Big thanks for help...

Answer

Daniel V&#233;rit&#233; picture Daniel Vérité · Apr 30, 2015

In Debian 8, apache2 configurations are now in /etc/apache2/conf-available and soft-linked from /etc/apache2/conf-enabled when enabled, just like virtualhosts or modules.

The phppgadmin package in its latest version comes with a predefined configuration file:
/etc/apache2/conf-available/phppgadmin.conf

This configuration should be activated by default, but otherwise it can be activated with a2enconf phppgadmin

Your old configuration /etc/apache2/conf.d/phppgadmin should be removed as well as the mentioned addition in /etc/apache2/sites-enabled/000-default.conf.

Then edit phppgadmin.conf and remove the Require local directive that you don't want if you previously had Allow from all.