Solved

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

Posted on 2006-06-30
3
497 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

As Wikipedia explains 'robots.txt' as -- the robot exclusion standard, also known as the Robots Exclusion Protocol or robots.txt protocol, is a convention to prevent cooperating web spiders and other web robots from accessing all or part of a websit…
Over the last year I have answered a couple of basic URL rewriting questions several times so I thought I might as well have a stab at: explaining the basics, providing a few useful links and consolidating some of the most common queries into a sing…
I designed this idea while studying technology in the classroom.  This is a semester long project.  Students are asked to take photographs on a specific topic which they find meaningful, it can be a place or situation such as travel or homelessness.…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

919 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

15 Experts available now in Live!

Get 1:1 Help Now