-1

I have a webserver. I have really only ever needed N domainnames to point to that particular root, but now that i have started to expand, I wanted to sort of partition my webserver for different names. This is an example of what i want.

Domain Names:

alpha.com
bravo.com
charlie.com

Webserver:

/var/www/

Allocation:

alpha.com -> /var/www/

What i want all within the same server:

alpha.com -> /var/www/alpha/
bravo.com -> /var/www/bravo/
charlie.com -> /var/www/charlie/

then alpha/. would be the new root. That way the user will not see any fancy URL designs.

It will keep me with 1 server, but separate out the roots of the different components. I WAS just spinning up a new server over and over for different domain names, but i figured some things which are static could just all be lumped together since the sum processing power of them all is next to nothing.

I knew that if i go to namecheap/other and say:

alpha.com -> 127.0.0.1/alpha

it will then say something in the url similar to: alpha.com/alpha/ which i dont want.

Goal that i have been stumped over: making a,b,c looking like different servers while actually maintaining 1 server with different root nodes

Fallenreaper
  • 10,222
  • 12
  • 66
  • 129
  • 1
    Hopefully I'm not over-simplifying your problem, but perhaps you're looking for name-based virtual hosts? http://httpd.apache.org/docs/2.4/vhosts/name-based.html. Are you familiar with this? – Ian Drake Feb 02 '16 at 19:07
  • Harsh you've been downvoted, you're question is well defined but you can't have multiple documents roots as you'd like. What you can have is virtual hosts. Check out https://httpd.apache.org/docs/2.2/vhosts/examples.html – Madivad Feb 03 '16 at 11:09
  • I dont really get why I was downvoted. I feel i was given a legitimiate question, though VHOSTs sounds like it might be what i am looking for. – Fallenreaper Feb 03 '16 at 16:00

1 Answers1

0

The following explains how to use lighttpd to set up virtual hosting for your servers.

http://www.cyberciti.biz/tips/howto-lighttpd-web-server-setting-up-virtual-hosting.html

Following it, it is very straight forward and already have tested it out.

Fallenreaper
  • 10,222
  • 12
  • 66
  • 129