20, March 2010

Setting up a redirect - webmaster forum

 
Webdigity webmaster forums
[ Home | Help | Search | Forum's Shop | Archive | Login | Register | Webmaster Directory ]
Webdigity Webmaster Forums  >  Web hosting talk  >  Configuring your server
Topic: Setting up a redirect
« previous next »
Pages: [1] Print

Author Topic: Setting up a redirect  (Read 839 times)
Google dot what?
*
Posts: 2
16 credits
Members referred : 0


« on: Jun 02, 2009, 08:54:38 pm »

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.
I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 5659
45587 credits
Members referred : 3



« Reply #1 on: Jun 02, 2009, 09:00:31 pm »

Never done that, but it look like a "job" for the squid web server. Have you tried that?

Trial and Error my two best teachers Cool
Join us @ facebook or twitter

Last blog : Butterfly Marketing 2.0
Google dot what?
*
Posts: 2
16 credits
Members referred : 0


« Reply #2 on: Jun 02, 2009, 09:09:42 pm »

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!
Trackback URI for this entry : http://www.webdigity.com/trackback.php?topic=8826
Tags : redirect proxy apache VMWare Bookmark this thread : Digg Del.icio.us Dzone more....

Pages: [1] Print 
Webdigity Webmaster Forums  >  Web hosting talk  >  Configuring your server
Topic: Setting up a redirect
« previous next »
Jump to:
User Area
Welcome, Guest. Please login or register.
Did you miss your activation email?
Mar 20, 2010, 10:06:31 am





Login with username, password and session length

Donate to our community, and get a permanent link back to your site!

Donate to our community, and get a permanent link back to your site!


Forum Statistics
Total Posts: 44.225
Total Topics: 8.623
Total Members: 8.237
Tutorials : 58
Resources : 929
Designs : 360
Latest Member: irislogic

32 Guests, 4 Users online :

16 users online today:



Readers

Web Design Gallery · Whois Lookup · Pagerank · Tag Browsing · Lo-fi version · Syndication · Webmaster forum history · Advertise
Developed by HumanWorks © 2005 - 2010 Webdigity webmaster community · sublime directory
Webdigity Webmaster Forums | Powered by SMF 1.0.12. © 2001-2005, Lewis Media. All Rights Reserved.