Multiple Web Sites on the same server
Roger Grosswiler
roger at gwch.net
Thu Oct 14 06:56:16 UTC 2004
What is the best practice for getting a single server to host multiple domains?
Specifically, I have access to a few public IP addresses and I would like each web
site to use a unique public IP address, just in case we desire to break out the
sites onto seperate servers.
I want to set up the DNS for the domains to point to the unique addresses from the
start.
Does this make sense?
I need to multi-home the servers NIC, yes?
How do I do that?
What do I need to do on the server to serve out multiple sites?
Thanks in advance,
Hi,
Best is to read about virtual hosts in apache here : http://httpd.apache.org/docs-2.0/vhosts/
They have two concepts, name or ip-based services. Are those servers all from the same domain? Do you use your own
DNS-server for this domain? if you reply with yes, you can handle several sites on the same ip-adress by namedbased
virtual hosts.
As you have to enter all your virtual hosts even in your DNS-server, it's up to you how you handle. I would prefer
having all on one IP-adress, with the appropiate entry in my DNS-Zone (either via CNAME or A entry, CNAME is more
comfortable ;-)).
If you split your sites on more than one server, you just have to change the dns-entry for the host to the new
ip-adress on your DNS-server.
If you do it vi ip-based, think about aliasing your Ethernet-Interface and indicating the appropriate IP-Adresses. The
rest you should also find in the document of the virtual hosting from apache an about aliasing here:
http://home.pacific.net.sg/~harish/linuxipalias.html
HTH
Roger
More information about the fedora-list
mailing list