VirtualHost on Apache 2.4 with PHP-FPM Getting proxy_fcgi:error

Refresh

November 2018

Views

2.1k time

3

I am trying to make a VirtualHost for my Wordpress project that's being hosted on a EC2 Instance by Apache 2.4 with PHP-FPM. Most of the resources being loaded (mostly scripts and other php) are getting a 404 Error and when I look in the error log for the virtual host, I get the following errors

[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/

Below is my Virtual Host portion of the conf

<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>

And below is the address portion of the php-fpm configuration.

; 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

Please HELP! I have looked everywhere and can not find a solution. I am allowing all traffic to all ports from EC2, I tried all kinds of combinations for different apache Directives, and I even tried to add the js|html and all that stuff to the ProxyPassMatch.

What is causing this? Help is greatly appreciated.

0 answers