httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andreas B." <>
Subject mod_proxy: unwieldy unix socket implementation.
Date Wed, 19 Mar 2014 05:15:31 GMT

I saw the new unix sockets for mod_proxy in 2.4.9 and I am wondering why 
there has to be a special url format. Wouldn't it be possible to supply 
the socket path as a proxy parameter? I have something like this in mind:

     <Proxy "fcgi://php-fpm.local">
         ProxySet "unix=/run/php-fpm/php-fpm.sock"
     <FilesMatch \.php$>
         SetHandler "proxy:fcgi://php-fpm.local"

or with ProxyPass:
     ProxyPass /php-bin "proxy:fcgi://php-fpm.local/src/http/" 
     ProxyPassMatch ^(/.*\.php)$ "fcgi://php-fpm.local/srv/http/" 

I can provide an incomplete patchset for this. I didn't touch the 
documentation, mod_proxy_balancer output and log messages. This would 
get rid of de_socketfy() and make the codepath much cleaner I think.


PS: I found some strange behaviour with ProxyPassMatch. When you use a 
group match (e.g. $1) in the result string, you'll have to define the 
parameters in a separate proxy section. This Probably applies to 
ProxyPass with the regex-tilde as well
     ProxyPassMatch ^(/.*\.php)$ "fcgi://php-fpm.local/srv/http/$1"
     <Proxy "fcgi://php-fpm.local/srv/http">
         ProxySet "unix=/run/php-fpm/php-fpm.sock"

View raw message