Re: Forcing URL Rewrite before Proxy pass

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks for the note.

When I use the P flag with the RewriteRule, ProxyPass
fails, since I do not have an SSLProxy.

What I have is this:

       (Apache web server)  <-----> Tomcat servlet container

What I need is to:
    - require all requests for ^/secure/... to be made thru https
    - terminate SSL on Apache
    - after SSL termination, forward all requests for ^/secure/ 
       to http://localhost:8080/secure

I do not want to proxy SSL onto omcat from Apache.
Am I headed in the right direction with regards to the configuration?

Thanx!

/U


Eric Covener wrote:
> 
> On Fri, Jul 31, 2009 at 8:20 PM, /U<uma_rk@xxxxxxxxxxx> 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@xxxxxxxxx
> 
> ---------------------------------------------------------------------
> 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@xxxxxxxxxxxxxxxx
>    "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
> For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Forcing-URL-Rewrite-before-Proxy-pass-tp24764763p24765222.html
Sent from the Apache HTTP Server - Users mailing list archive at Nabble.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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux