Reputation: 2220
Is it possible to set up two sub domains and point them to the same folder, but keeping the url when accessing the site?
I have domains, one for business and one private, like this:
And I have created two sub domains like so:
dev.private.tld
dev.business.tld
dev = development : This is where I test out new stuff and where I presents/demonstrate finished modules.
Since they're both mine, I only need one single location for this. But when I share, I want to give the user the impression of they being either on my private or business development area.
All domains are on the same host and they're both add-ons domain to that account.
Do someone know how to get something like this scenario to work?
EDIT#1 : Just got to think of one thing; when I create the sub domains, if I point them directrly to the very same folder - would that do the trick? (@work so can't test it out right know) But would like to hear your thoughts on this...
Upvotes: 3
Views: 2693
Reputation: 1
It is possible.
You can point your VirtualHosts everywhere you want.
With NGiNX for example use server blocks http://wiki.nginx.org/ServerBlockExample
with different server_name's http://nginx.org/en/docs/http/server_names.html
and location's
Also you can benefit from reverse proxy mechanism: nginx.com/resources/admin-guide/reverse-proxy/ (pass headers or change them on a fly, etc.)
Upvotes: 0