httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Covener <cove...@gmail.com>
Subject Re: [users@httpd] Forcing URL Rewrite before Proxy pass
Date Sat, 01 Aug 2009 00:37:09 GMT
On Fri, Jul 31, 2009 at 8:20 PM, /U<uma_rk@comcast.net> wrote:
>
> Apache: 2.2.0
>
> I need to
>   a) require SSL on requests to /secure (i.e., http://server/secure ->
> https://server/secure)
>   b) and as the second step, offload (proxy) https://server/secure to
> http://server:8080/secure
>
> I thought I could accomplish (a) using mod_rewrite and (b) using Proxy pass
> as follows:
>
> RewriteEngine On
> RewriteLog  "/tmp/http.log"
> RewriteLogLevel 9
> RewriteCond %{SERVER_PORT}!443$
> RewriteRule ^/secure(.*) https://%{HTTP_HOST}:443/secure$1 [R=301,L]
>
> <Proxy balancer://clusterx>
> BalancerMember http://localhost:8080/
> </Proxy>
> ProxyPass /secure balancer://clusterx/
>
> However, this does not work. A request http://server/secure is directly
> forwarded to
> http://server:8080/secure
>
>
> Is there anyway to force Rewrite before proxy pass?

Use the "P" flag in rewrite instead of ProxyPass, and you can control
the flow directly.



-- 
Eric Covener
covener@gmail.com

---------------------------------------------------------------------
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