Welcome! Log In Create A New Profile

Advanced

httpd 2.2, vhost_alias, php-fpm, "dynamic" pool selection ?

Posted by Martial Clausse 
Martial Clausse
httpd 2.2, vhost_alias, php-fpm, "dynamic" pool selection ?
February 25, 2014 05:24AM
Hello everyone,

On Debian Wheezy, I'm configuring Apache (2.2) to work with mod_fastcgi,
mod_vhost_alias and php-fpm.

FastCgiExternalServer connects to a user-specific pool, that's the easy
part.

However, I need to use mod_vhost_alias and I'd like that Apache deduce the
FastCgiExternalServer socket in the same way I setuped VirtualDocumentRoot.

Here's an example of vhost configuration I'd like to do:

<VirtualHost *:80>

ServerAdmin webmaster@example.com
ServerName example.com
ServerAlias *

DocumentRoot /home/example/www/
VirtualDocumentRoot /home/%2/%1/

FastCgiExternalServer /fcgi-bin-php5-fpm-%2 -socket
/var/run/php5-fpm-%2.sock -pass-header Authorization

<Directory * >

Options all FollowSymLinks MultiViews ExecCGI -Indexes

AllowOverride all

</Directory>

RewriteEngine on
RewriteCond %{HTTP_HOST} !.*\..*\..*
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}$1 [QSA]

</VirtualHost>

Obviously, it doesn't work, since FastCgiExternalServer doesn't understand
%2.

How could I achieve that ?

Thanks in advance !

PS : this has been cross-posted to Server Fault
(http://serverfault.com/questions/577883/php-fpm-pool-selection-using-vhost-alias).

--

---
You received this message because you are subscribed to the Google Groups "highload-php-en" group.
To unsubscribe from this group and stop receiving emails from it, send an email to highload-php-en+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 82
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready