On Mar 19, 2014, at 1:15 AM, Andreas B. <regis...@progandy.de> wrote:
> Hello, > > 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? It would be. We chose otherwise. That way, we have a unified format that could be used for other things. > I have something like this in mind: > > <Proxy "fcgi://php-fpm.local"> > ProxySet "unix=/run/php-fpm/php-fpm.sock" > </Proxy> > <FilesMatch \.php$> > SetHandler "proxy:fcgi://php-fpm.local" > </FilesMatch> > > or with ProxyPass: > ProxyPass /php-bin "proxy:fcgi://php-fpm.local/src/http/" > "unix=/run/php-fpm/php-fpm.sock" > ProxyPassMatch ^(/.*\.php)$ "fcgi://php-fpm.local/srv/http/" > "unix=/run/php-fpm/php-fpm.sock" > > 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. > > Andreas > > 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" > </Proxy> >