大网数据广告活动
服务器运维问答

Phppgadmin: 403 Forbidden

· 52CE 我爱测

I just set up phppgadmin on my webserver (a Debian Jessie) and I configure Apache this way to access it: <Virtualhost *:80> ServerName pga.mydomain.com DocumentRoot /usr/share/phppgadmin <Directory /usr/share/phppgadmin> Director…

问题原文

原帖链接 · MBR · CC BY-SA 3.0

I just set up phppgadmin on my webserver (a Debian Jessie) and I configure Apache this way to access it:

<Virtualhost *:80>
    ServerName pga.mydomain.com
    DocumentRoot /usr/share/phppgadmin

    <Directory /usr/share/phppgadmin>
        DirectoryIndex index.php
        Order deny,allow
        Allow from all
    </Directory>
</Virtualhost>

It is rightly in its place in /etc/apache2/site-available and I enabled it with a2ensite. (edit: I did exactly the same for phpmyadmin and it works perfectly.)

However, when I try to access it through http://pga.mydomain.com, I get a 403 Forbidden error. If I take a look at my Apache log, I find the following:

[authz_core:error] [pid 32700] [client xxx.xxx.xxx.xxx:36059] AH01630: client denied by server configuration: /usr/share/phppgadmin/

It seems to me that the Allow from all should let me access it even remotely. I tried different combinations of permissions, neither of them working. I see this error floating around a lot but I did not find a satisfactory solution yet. Any advice would be greatly appreciated!

已采纳解答

原帖链接 · MBR · CC BY-SA 3.0

I continued to fiddle with the Apache configuration and I replaced:

<Directory /usr/share/phppgadmin>
    DirectoryIndex index.php
    Order deny,allow
    Allow from all
</Directory>

by

<Directory /usr/share/phppgadmin>
   Require all granted
</Directory>

did the trick.

I am always not completely clear about these kind of details with Apache config that seems to be the same or about the same but give completely different results in the end... Any enlightment on this point would be appreciated!

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2017-08-17)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。