Solved

Is it possible to reverse proxy (for Apache), multiple sites, but all have the same path?

Posted on 2006-06-30
3
493 Views
Last Modified: 2012-05-05
I have an SAP environment, where we are doing Reverse proxy for everything.

The reverse proxy is running correctly, except 2 of the subsites from the portal have different server names, but the same path.

How do I reverse proxy for:

http://server1.proxy.net:8023
http://server2.proxy.net:8006

Their unproxied paths are the same for all content: (except the cookie, but the cookie path is the same for both):
/sap/bc/gui/sap/its/mimes

The first statement from the proxied portal (mainproxy.proxy.net) to the subsites (server1,server2) calls the rewrite rule:
for the cookie)
RewriteRule ^/sap(.*)/bc/gui/sap/its/webgui(.*) http://server1.proxy.net:8023$0 [P]
RewriteRule ^/sap(.*)/bc/gui/sap/its/webgui(.*) http://server2.proxy.net:8006$0 [P]

But it never goes to the second.  

Is there a way to examine the headers, or a way to do if/then statements?
Thanks for looking at my question.

Steph
0
Comment
Question by:blasapher
3 Comments
 
LVL 27

Accepted Solution

by:
caterham_www earned 250 total points
ID: 17115953
Yes, you can check http request headers with a RewriteCond.

To check the value of a Cookie sent in the http request by the browser, you might want to use

RewriteCond %{HTTP_COOKIE} something
RewriteRule ^/sap(.*)/bc/gui/sap/its/webgui(.*) http://server2.proxy.net:8006$0 [P]
RewriteRule ^/sap(.*)/bc/gui/sap/its/webgui(.*) http://server1.proxy.net:8023$0 [P]
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

In my time as an SEO for the last 2 years and in the questions I have assisted with on here I have always seen the need to redirect from non-www urls to their www versions. For instance redirecting http://domain.com (http://domain.com) to http…
Introduction As you’re probably aware the HTTP protocol offers basic / weak authentication, which in combination with the relevant configuration on your web server, provides the ability to password protect all or part of your host.  If you were not…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now