10

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

Kamaraju Kusumanchi
  • 1,809
  • 19
  • 12
Macbernie
  • 1,303
  • 6
  • 24
  • 48

3 Answers3

20

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.

Daniel Vérité
  • 58,074
  • 15
  • 129
  • 156
6

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

Mahdi Bashirpour
  • 17,147
  • 12
  • 117
  • 144
Aman Shukla
  • 61
  • 1
  • 1
  • Welcome to StackOverflow. When adding an answer to an older question with an existing accepted answer it is helpful to note how your new answer differs and what additional information it brings to the question. – Jason Aller Jan 30 '18 at 16:45
0

Actually, if you're using Apache 2.4, you must replace Require local directive to Require all granted

Ivan Apolonio
  • 326
  • 2
  • 8