Apache ProxyPassMatch - two fcgi processes - by query string
I would like to send all of my php scripts to be processed by one fcgi process, except for one single, very specific call of the script, which I would like to send to php-fpm, which is another fcgi process.
The one, single call of the php script handled by the php-fpm process can be identified by a query key/value – say, "callback=1". So, for example, if "
I would like to continue to use ProxyPassMatch, however I would like to filter the first fcgi process (see below) for the key/value pair being present.
The two processes are in the virtual host file as shown below. Again, I would like the first fcgi process (the php-fpm process) to apply only if "callback=1" is in the query string (I recognize that currently both are set to apply to all php files - so all will go to the the first match -- i am just showing that way as a start for editing).
Virtual Host Excerpt:
RewriteEngine On
add .php to access file, but don't redirect
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteCond %{REQUEST_URI} !/$
RewriteRule (.*) $1.php [L]
First fcgi – for php-fpm on port 9000 using TCP
ProxyPassMatch ^/(..php(/.)?)$ fcgi://127.0.0.1:9000/home/webmaster/public/domain.com/public/$1
Second fcgi -- for HHVM on port 9001 using TCP
ProxyPassMatch ^/(..php(/.)?)$ fcgi://127.0.0.1:9001/home/webmaster/public/domain.com/public/$1
Thank you in advance.