Re: mod_proxy: unwieldy unix socket implementation.
On Mar 19, 2014, at 1:15 AM, Andreas B. 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: > > >ProxySet "unix=/run/php-fpm/php-fpm.sock" > > >SetHandler "proxy:fcgi://php-fpm.local" > > > 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" > >ProxySet "unix=/run/php-fpm/php-fpm.sock" > >
Re: mod_proxy: unwieldy unix socket implementation.
On 03/19/2014 06:15 AM, Andreas B. 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? I have something like this in mind: ProxySet "unix=/run/php-fpm/php-fpm.sock" SetHandler "proxy:fcgi://php-fpm.local" 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" ProxySet "unix=/run/php-fpm/php-fpm.sock" Check "[PATCH] Fix settings options with ProxyPassMatch" thread for this particular problem. Jan Kaluza