• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 255
  • Last Modified:

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
0
shankshank
Asked:
shankshank
  • 2
1 Solution
 
grahamnonweilerCommented:
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.
0
 
shankshankAuthor Commented:
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
0
 
grahamnonweilerCommented:
You can "redirect" www.site.com/subfolder  to   ww2.site.com  but the second server will still have to have its own sub domain and DNS.

The redirect will make it a little easier from a visitor/user perspective.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now