6

I try to install postgreSql on my wampserver

So I follow some tutorial and some other...

But when I access to localhost/phppgadmin/, an error occurs:

Forbidden

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

Though I active php_pgsql and php_pdo_pgsql in PHP extensions...

My phppgadmin.conf:

# File phppgadmin.conf
Alias /phppgadmin "C:/wamp/apps/phppgadmin5.1/"

<Directory "C:/wamp/apps/phppgadmin5.1/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Deny,Allow
Allow from all
</Directory>

Thanks for help !

Macbernie
  • 1,303
  • 6
  • 24
  • 48

2 Answers2

17

I solve the problem by entering the line:

Require local

in the phppgadmin.conf:

# Fichier phppgadmin.conf
Alias /phppgadmin "C:/wamp/apps/phppgadmin5.1/"

<Directory "C:/wamp/apps/phppgadmin5.1/">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride all
    Require local
    Order Deny,Allow
    Allow from all
</Directory>
Macbernie
  • 1,303
  • 6
  • 24
  • 48
  • This put me in the right direction, my Alias path was wrong. WAMP is in c:/wamp64/... – Chad Aug 30 '17 at 14:32
0

For things such as PhpMyAdmin, PhpPgAdmin or other dangerous tools, you don't want to risk people from the Internet exploiting security holes in these programs. As a matter of fact web server logs are full of direct access to known vulnerabilities, often leading to 404 because they target an older version.

That being said, I would advise putting this in your configuration file:

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

Replace 192.168.1.0/24 with your LAN or VPN subnet. An SSH tunnel is another secure option.

I am not one of these guys, but do know that if you encounter that kind of problem right after installing a package, your problem is probably adressed in the README made by the package manager. On Debian, this would have been /usr/share/doc/phppgadmin/README.Debian.

tiktak
  • 1,214
  • 8
  • 15