Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Imagine you have several web sites deployed in different servers. It's posible to share the main domain? V.g.:

share|improve this question

closed as not a real question by mgorven, Brent Pabst, MDMarra, Chris S May 17 '13 at 17:19

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

Short answer yes, not so short answer, yes, but you'll need something in front, like a proxy, or load balancer. – NickW May 17 '13 at 14:52
I am tempted to downvote this question as being overly vague. I think that it could used a bit of clarification. What is the network scenario? Are we to assume these web servers are all public? By "main domain" do you mean the second-level domain name (eg or are you willing to consider third-level sub-domain names? Your URL examples show each web site as a sub-folder which is also a valid solution for having multiple public web sites sharing a single second-level domain name. @Apocatastasis, can you elaborate on the question? – SunSparc May 17 '13 at 16:13
@SunSparc: Don't be tempted, just do it! – Iain May 17 '13 at 16:33
up vote 1 down vote accepted

Short answer: yes. It's far far easier to use a subdomain since otherwise you would need a proxy.

To extend on this, suppose you have site1, site2, and site3 on different web servers. Rather than trying to mess with a proxy, simply add a subdomain to your domain like that points to the proper web server.

The more complicated method (if you can't have/don't want subdomains) is to use something like nginx to proxy requests for the specific folders to a remote site. This page has a decent starting point:

Again, it's much much easier to just add a subdomain.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.