Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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 mydomain.com) 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
add comment

1 Answer

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 site1.domain.com 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: http://www.kirkdesigns.co.uk/nginx-proxy-apache-access-remote-host-ip-address-using-modpraf

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

share|improve this answer
add comment

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