httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From koen.vdve...@proviron.com
Subject Re: [users@httpd] User dir an reverse proxy
Date Fri, 03 Mar 2006 12:51:43 GMT


-----"Emmanuel.Leguy" <Emmanuel.Leguy@lifl.fr> wrote: -----

>To: users@httpd.apache.org
>From: "Emmanuel.Leguy" <Emmanuel.Leguy@lifl.fr>
>Date: 03/03/2006 13:25
>Subject: [users@httpd] User dir an reverse proxy
>
>Hello,
>
>My config:
>proxy server: Apache 2.2
>real server: Apache 1.3 (2.2 soon)
>
>I would like to reverse proxy requests to userdir (public_html) like
>that:
>
>http://proxy.domain.fr/~username-->
>http://realserver.domain.fr/~username
>
>Thoose directives work for that particular 'username':
>
>PassProxy /~username http://realserver.domain.fr/~username
>PassProxyReverse /~username http://realserver.domain.fr/~username
>
>But i would like to generalized to all users:
>
>PassProxy /~(.*) http://realserver.domain.fr/~$1
>PassProxyReverse /~(.*) http://realserver.domain.fr/~$1
>
>But PassProxy and PassProxyReverse don't process regex...
>
>So I tried rewriting:
>
>RewriteEngine On
>RewriteRule ^/\~(.*) http://realserver.domain.fr/~$1[proxy,last]
>
>But if the trailing slash is forgotten the realserver redirect the
>request:
>
>http://proxy.domain.fr/~username-->
>http://realserver.domain.fr/~username
>redirection to http://realserver.domain.fr/~username/
>
>The real server is not visible from the internet so the request
>fails.
>
>The solution could be that the proxy server does the trailing slash
>redirection instead of the real server. But '~username' is not a
>directory for the proxy server so no trailing slash redirection is
>done...
>
>How to force the redirection on the proxy?
>Is there a solution to my problem?
>
>Thanx,
>
>Manu.
>
>--
>Emmanuel Leguy              LIFL - UMR8022 CNRS - Bat M3
>Tel: +33 3 28 77 85 32      USTL - Universite de Lille 1
>Fax: +33 3 28 77 85 37      59655 VILLENEUVE D'ASCQ CEDEX - FRANCE
>
>mailto:Emmanuel.Leguy@lifl.fr
>http://www.lifl.fr/ANNUAIRE/employee.php?login=leguye
>

Dear,

since the directory path is the same for both internal and external
request,
why don't you just "rewrite" the host part, and leave the directory-path
unchanged ?

I would think that this should do the job :
>  PassProxy /         http://realserver.domain.fr/
>  PassProxyReverse /  http://realserver.domain.fr/

At least : something simular works in my configuration

kind regards,
Koen.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message