Link to home
Start Free TrialLog in
Avatar of shankshank
shankshank

asked on

Web site re-direction

I currently run a website on apache on SERVERA that is located here
www.site.com/MYSITE

I need to launch another site using the same domain but located on a different web server SERVER B
www.site.com

How do I configure this? Right now DNS points to SERVERA.

Do I configure apache on server A to redirect www.site.com to a different IP address? I need something reliable and that makes sense

thank you
Avatar of Graham N.
Graham N.
Flag of United Arab Emirates image

On the assumption you have different content on the two different servers, then the only way you can reliably handle it is to use a different sub-domain on the second server. Then you would simply set-up DNS for the sub-domain to point at the second server.

For instance:

                  www.site.com  ->  A record pointing to server 1 IP address.
                  ww2.site.com  ->  A record pointing to server 2 IP address

If the content on both servers is the same, and you are trying to "load balance" between the servers using DNS - then you could use "round robin" style entries in your DNS.

What you suggested as a solution, having the first server redirect to a different IP address would result in the visitor seeing the IP address of the second server in their browser.

Another route you could take would be to us reverse proxy in front of both servers, and handle the redirects there.
Avatar of shankshank
shankshank

ASKER

Yes there is different content on the two servers. Yeah I figured we had to do a different subdomain, I just wasn't sure if we can cheat for the www.domain vs the www.domain/subfolder
ASKER CERTIFIED SOLUTION
Avatar of Graham N.
Graham N.
Flag of United Arab Emirates image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial