httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Aymerich <glicer...@gmail.com>
Subject [users@httpd] Re: ProxyPassMatch with Unix sockets
Date Thu, 17 Apr 2014 21:18:56 GMT
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/


-- 
Marc

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message