You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Daryl King <al...@gmail.com> on 2015/08/28 16:26:18 UTC

[users@httpd] correct proxy_fcgi setup for phpmyadmin using Apache 2.4.10

I'm using Apache 2.4.10 with PHP-FPM and mod_proxy_fcgi. Although I can
successfully use ProxyPassMatch for all php files under my web root
(including /phpmyadmin) using this:
"ProxyPassMatch ^/(.*\.php(/.*)?)$ unix:/var/run/php5-fpm.sock|fcgi://
127.0.0.1:9000/website/public"
I found that I would consistently get this error in my Apache log:
[proxy_fcgi:error] AH01071: Got error 'Primary script unknown\n'

The only way to stop it was to use this instead:
<FilesMatch \.php$>
        SetHandler "proxy:unix:/var/run/php5-fpm.sock|fcgi://localhost/"
</FilesMatch>

The only problem now is that the .php files in /phpmyadmin aren't
being proxied to PHP-FPM anymore and instead of a login box I get raw
php code.

I would like to continue using phpmyadmin but can't seem to get it
working again.