Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Wed Mar 18, 2015 8:53 am 
Offline
Newbie

Joined: Tue Jul 15, 2014 12:48 pm
Posts: 4
Hi,
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 "https://www.domain.com/api/index?callback=1&otherparam=2" is sent, it should be handled by php-fpm; otherwise, if "callback=1" is not present in the query string, then the request should be handled by the second fcgi process shown below.

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/pu ... /public/$1

# Second fcgi -- for HHVM on port 9001 using TCP
ProxyPassMatch ^/(.*.php(/.*)?)$ fcgi://127.0.0.1:9001/home/webmaster/pu ... /public/$1

**************************
Thank you in advance.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group