Sublime directory Surf the web anonymous Pagerank Monitor


Setting up a redirect

SuperSteef
Tue 2 June 2009, 07:54 pm GMT +0200
Hey guys.

I've been playing with mod_rewrite, mod_alias and the variety of mod_proxy the last 2 days.  What I've been asked to do is this...

We have 1 domain name pointing at an IP address.  That IP address goes through 2 routers both having port 80 open and routing it to 1 of 4 virtual machines (demo.server.com will be the example).  So, one of our clients would type in server.com and be directed to the webpage on demo.server.com.  Now, if they type in staging.server.com instead, it still has to hit demo.server.com due to routing.  What I'm trying to do is create a reverse proxy that, when a user outside the network tries to get to staging.server.com, demo.server.com, it grabs the information from that virtual machine.

We are running Apache2.2 on Ubuntu 8.10 and each virtual machine was created with VMWare.

This is what I would expect the code to be but, alas, it doesn't work :p

ProxyRequests Off
ProxyPass staging.server.com http:// staging.server.com
ProxyPassReverse staging.server.com http:// staging.server.com

Now, I know using a proxy that the server is accessible because doing the following worked...

ProxyRequests Off
ProxyPass /staging http:// staging.server.com
ProxyPassReverse /staging http:// staging.server.com

(The http:// and staging.server.com were separated to avoid creating a link)

The above worked if the user entered server.com/staging which is not how we want it to work but I utilized as a test and would be able to live with for now.  The only problem was none of the links on the page would link to the proper content on the staging server, instead it looked back on the demo machine.

And, while I'm at it, we also need to point server.com/Intranet to an IP address.  Again, we have 2 routers, so R1 is where the internet comes into and R2 plugs into R1.  R1 is 192.168.0.1, R2 is 192.168.0.55 with R2s range being 192.168.24.1.  I need to point that address (server.com/Intranet) to 192.168.0.21.  When doing this, I received all of the header information (webpage name and frame layout) but none of the content, receiving instead 404 errors for all 4 frames.

Any help on any of the above would be greatly appreciated.

Nikolas
Tue 2 June 2009, 08:00 pm GMT +0200
Never done that, but it look like a "job" for the squid web server. Have you tried that?

SuperSteef
Tue 2 June 2009, 08:09 pm GMT +0200
One of our clients utilized Squid about a year ago but I have not had experience with it personally.  Based on what I have read about Apache and httpd.conf, I assumed that what I wanted to do would be possible with some simple redirects without needing to install any additional software.

Basically, before I head the direction of another add-on to our web server, I'm trying to exhaust all of my Apache configuration options.

Thanks for the fast response!

optiplex
Sat 23 April 2011, 10:43 am GMT +0200
I don't able to manage it.
Please share E-book for  me.

Archive for SMF v1.00 by N.P. Valid XHTML 1.0 Transitional