Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

like image 701
Macbernie Avatar asked Apr 30 '15 14:04

Macbernie


2 Answers

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.

like image 114
Daniel Vérité Avatar answered Oct 19 '22 17:10

Daniel Vérité


you can easily solve this problem by replacing Require local directive to Allow from all in configuration file /etc/apache2/conf-available/phppgadmin.conf

like image 43
Aman Shukla Avatar answered Oct 19 '22 19:10

Aman Shukla