postgresql /phppgadmin Forbidden 您无权访问此服务器上的 /phppgadmin/
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/29970054/
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
/phppgadmin Forbidden You don't have permission to access /phppgadmin/ on this server
提问by Macbernie
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
我最近将我的服务器从 Debian Wheezy 升级到 Debian Jessie (Debian 8)。许多软件包已更新,现在,我无权从http://myIP/phppgadmin访问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:
在 /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:
在 /etc/apache2/sites-enabled/000-default.conf 我添加:
<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...
我尝试更改/usr/share/phppgadmin/、/var/www...的权限
And I have the same message even if I uninstall the package phpgpadmin !
即使我卸载了 phpgpadmin 包,我也会收到相同的消息!
apt-get remove phppgadmin
Big thanks for help...
非常感谢您的帮助...
回答by Daniel Vérité
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.
在 Debian 8 中,apache2 配置现在处于启用状态/etc/apache2/conf-available
并从/etc/apache2/conf-enabled
启用时开始软链接,就像虚拟主机或模块一样。
The phppgadmin
package in its latest version comes with a predefined configuration file:/etc/apache2/conf-available/phppgadmin.conf
phppgadmin
最新版本的软件包带有一个预定义的配置文件:/etc/apache2/conf-available/phppgadmin.conf
This configuration should be activated by default, but otherwise it can be activated with a2enconf phppgadmin
默认情况下应该激活此配置,否则可以使用 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
.
您的旧配置/etc/apache2/conf.d/phppgadmin
以及/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
.
然后编辑phppgadmin.conf
并删除Require local
您不想要的指令,如果您以前拥有Allow from all
.
回答by Aman Shukla
you can easily solve this problem by replacing Require localdirective to Allow from allin configuration file /etc/apache2/conf-available/phppgadmin.conf
您可以通过在配置文件/etc/apache2/conf-available/phppgadmin.conf中将Require local指令替换为Allow from all来轻松解决此问题