postgresql http://localhost/phppgadmin/ -> 403 禁止
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/24414358/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
http://localhost/phppgadmin/ -> 403 Forbidden
提问by Macbernie
I try to install postgreSql on my wampserver
我尝试在我的wampserver上安装 postgreSql
So I follow some tutorialand some other...
所以我遵循一些教程和其他一些......
But when I access to localhost/phppgadmin/
, an error occurs:
但是当我访问时localhost/phppgadmin/
,出现错误:
Forbidden
You don't have permission to access /phppgadmin/ on this server.
Though I active php_pgsql and php_pdo_pgsql in PHP extensions...
虽然我在 PHP 扩展中激活了 php_pgsql 和 php_pdo_pgsql ......
My phppgadmin.conf:
我的 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 !
感谢帮助 !
回答by Macbernie
I solve the problem by entering the line:
我通过输入以下行来解决问题:
Require local
in the phppgadmin.conf:
在 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>
回答by tiktak
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.
对于诸如 PhpMyAdmin、PhpPgAdmin 或其他危险工具之类的东西,您不希望让人们从 Internet 上冒利用这些程序中的安全漏洞的风险。事实上,Web 服务器日志充满了对已知漏洞的直接访问,通常会导致 404,因为它们针对的是旧版本。
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.
替换192.168.1.0/24
为您的 LAN 或 VPN 子网。SSH 隧道是另一个安全选项。
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
.
我不是这些人中的一员,但我知道如果您在安装软件包后立即遇到这种问题,您的问题可能在软件包管理器制作的 README 中得到了解决。在 Debian 上,这应该是/usr/share/doc/phppgadmin/README.Debian
.