Apache 2.4.6:服务器配置拒绝客户端(PHP FPM)

时间:2013-10-29 10:27:40

标签: apache php

我发现了类似的问题,但没有帮助。

当我通过https://site/test.php打开PHP文件时,出现以下错误:

[Tue Oct 29 11:15:53.480855 2013] [authz_core:error] [pid 5424] [client xxx.xxx.xxx.xxx:xxxxx] AH01630: client denied by server configuration: /vhost_site_ssl

虚拟主机:

<VirtualHost *:443>
  ServerName site:443
  ServerAlias www.site:443
  DocumentRoot /opt/web/site

  SSLEngine on
  SSLCertificateFile /etc/apache2/ssl/privkey.pem

  ErrorLog "/opt/log/apache/site_ssl-error.log"
  CustomLog "/opt/log/apache/site_ssl-access.log" combined
  CustomLog "/opt/log/apache/site_ssl-bandwidth.log" common

  <Directory /opt/web/site>
    AllowOverride All
    Options +Indexes +FollowSymLinks +MultiViews
    Order allow,deny
    Allow from all
    Require all granted
  </Directory>

  <Directory /vhost_site_ssl>
    AllowOverride All
    Order allow,deny
    Allow from all
    Require all granted
    Options +Indexes +FollowSymLinks +MultiViews
  </Directory>

  <Directory /php5-fpm-handler>
    AllowOverride All
    Order allow,deny
    Allow from all
    Require all granted
    Options +Indexes +FollowSymLinks +MultiViews
  </Directory>

  <IfModule mod_fastcgi.c>
    <FilesMatch \.php$>
      SetHandler php-script
    </FilesMatch>
    Action php-script /php5-fpm-handler
    Alias /php5-fpm-handler /vhost_site_ssl
    FastCGIExternalServer /vhost_site_ssl -socket /var/run/sock_site_ssl.sock
  </IfModule>
</VirtualHost>

我认为此错误是由将apache 2.2升级到2.4引起的。我也读过这个:http://httpd.apache.org/docs/2.4/upgrading.html但没有帮助。

更新

我忘了附上确切的错误页面:

Forbidden

You don't have permission to access /php5-fpm-handler/phpinfo.php on this server.
Apache/2.4.6 (Ubuntu) Server at site Port 80

0 个答案:

没有答案