http://localhost/phppgadmin/ -> 403 Forbidden

两盒软妹~` 提交于 2019-11-29 15:15:09

问题


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 !


回答1:


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>



回答2:


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.



来源:https://stackoverflow.com/questions/24414358/http-localhost-phppgadmin-403-forbidden

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!