httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Igor Cicimov <icici...@gmail.com>
Subject Re: [users@httpd] Re: ProxyPassMatch with Unix sockets
Date Fri, 18 Apr 2014 00:43:27 GMT
On 18/04/2014 8:25 AM, "Marc Aymerich" <glicerinu@gmail.com> wrote:
>
> On Thu, Apr 17, 2014 at 11:18 PM, Marc Aymerich <glicerinu@gmail.com>
wrote:
> > On Wed, Apr 16, 2014 at 11:17 PM, Marc Aymerich <glicerinu@gmail.com>
wrote:
> >> Hi,
> >> I have a PHP-FPM web application that I want it to be accessed under
> >> "/alias/" path. I'm trying to configure ProxyPassMatch with Unix
> >> sockets but it doesn't work because it passes "/alias/" to the web
> >> app, but this path doesn't exist :(
> >>
> >> What I have so far is this:
> >>
> >> ProxyPassMatch ^/alias/(.*\.php(/.*)?)$ \
> >> unix:/var/run/user-fpm.sock|fcgi://localhost/home/user/webapps/app1/
> >
> >
> > I think I got something :)
> >
> > if you guys like to comment on the following solution it would be
> > great! (I'm kind of newbie)
> >
> > # Rewrite the URL before proxying
> > RewriteRule ^/alias(.*\.php)$ $1 [L,PT]
> >
> > ProxyPassMatch ^/?(.*\.php)$
> > unix:/var/run/user.sock|fcgi://127.0.0.1/home/user/webapps/app1/
> >
> > # Create an alias for app1 static content
> > Alias /alias /home/user/webapps/app1/
>
>
> Well, actually this doesn't solve my original problem which is having
> two different php-fpm apps under the same VirtualHost.
>
> Based on the previous directives I kind of expected something like the
> following to work:
>
> <LocationMatch ^/app1(.*\.php)$>
>     RewriteRule $1 [L,PT]
>     ProxyPassMatch
> unix:/var/run/user.sock|fcgi://127.0.0.1/home/user/webapps/app1/
> </LocationMatch>
>
> <LocationMatch ^/app2(.*\.php)$>
>     RewriteRule $1 [L,PT]
>     ProxyPassMatch
> unix:/var/run/user.sock|fcgi://127.0.0.1/home/user/webapps/app2/
> </LocationMatch>
>
>
> But it doesn't, the RewriteRule seems to be totally ignored inside a
> LocationMatch no matter what I put there.
>
Did you read
http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxypassmatch

> Any idea on how to have several fgci apps connected by sockets under
> the same VirtualHost using different paths?
>
>
> >
> > --
> > Marc
>
>
>
> --
> Marc
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>

Mime
View raw message