我只是在我的web服务器(Debian Jessie)上设置了phppgadmin ,然后通过这种方式configurationApache来访问它:
<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>
这是正确的在/etc/apache2/site-available ,我用a2ensite启用它。 ( 编辑 :我做了完全一样的phpmyadmin ,它完美的作品。)
但是,当我尝试通过http://pga.mydomain.com访问它时,出现403 Forbidden错误。 如果我看看我的Apache日志,我发现以下内容:
[authz_core:error] [pid 32700] [client xxx.xxx.xxx.xxx:36059] AH01630: client denied by server configuration: /usr/share/phppgadmin/
在我看来, Allow from all应该允许我远程访问它。 我尝试了不同的权限组合,他们都没有工作。 我看到这个错误浮动很多,但我还没有find一个令人满意的解决scheme。 任何build议将不胜感激!
我继续摆弄Apache的configuration,我replace了:
<Directory /usr/share/phppgadmin> DirectoryIndex index.php Order deny,allow Allow from all </Directory>
通过
<Directory /usr/share/phppgadmin> Require all granted </Directory>
做的伎俩。
我总是不清楚这些细节与Apache的configuration,似乎是相同的或大致相同的,但在最后给完全不同的结果…任何启发这一点,将不胜感激!