使用PHP-FPM的Apache 2.4上的VirtualHost获取proxy_fcgi:错误

时间:2015-03-17 01:07:58

标签: apache virtualhost php httpd.conf

我正在尝试为我的Wordpress项目创建一个VirtualHost,该项目由Apache 2.4和PHP-FPM托管在EC2实例上。加载的大部分资源(主要是脚本和其他php)都会出现404错误,当我查看虚拟主机的错误日志时,会出现以下错误

[Tue Mar 17 01:01:56.026492 2015] [proxy_fcgi:error] [pid 3382] (22)Invalid argument: [client 173.79.19.155:61617] AH01075: Error dispatching request to : (passing brigade to output filters), referer: http://52.21.23.15/project/
[Tue Mar 17 01:01:56.816915 2015] [proxy_fcgi:error] [pid 2895] [client 173.79.19.155:61618] AH01068: Got bogus version 116, referer: http://52.21.23.15/project/

以下是我的虚拟主机部分

<VirtualHost *:80>
        ServerName project.com
        ServerAlias www.project.com
        DocumentRoot /var/www/html/project

        ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000/var/www/html/project/$1

        <Directory /var/www/html/project>
                Options Indexes FollowSymLinks
                AllowOverride All
                Require all granted
        </Directory>

        ErrorLog /var/www/html/project/logs/error.log
</VirtualHost>

以下是php-fpm配置的地址部分。

; The address on which to accept FastCGI requests.
; Valid syntaxes are:
;   'ip.add.re.ss:port'    - to listen on a TCP socket to a specific address on
;                            a specific port;
;   'port'                 - to listen on a TCP socket to all addresses on a
;                            specific port;
;   '/path/to/unix/socket' - to listen on a unix socket.
; Note: This value is mandatory.
listen = 127.0.0.1:9000

请帮助!我到处寻找,找不到解决方案。我允许从EC2到所有端口的所有流量,我为不同的apache指令尝试了各种组合,我甚至尝试将js | html和所有这些东西添加到ProxyPassMatch。

造成这种情况的原因是什么? 非常感谢帮助。

0 个答案:

没有答案