How to Host multiple Websites on Apache2

March 29, 2012 in Apache Configuration

How to Host multiple Websites on Apache2

Let’s say that we own 2 or more domain names (hostpage1.com and hostpage2.com). We also have 2 web pages (hostpage1 and hostpage2). But we have only 1 webserver and 1 public IP (for this example i will use local IP but it will be the same if you own a public static IP)

Setting up the Domain names.

First thing is to create an "A record" in the DNS of your Domain Names to point "www" to your public or local IP address of your Web Server. I use local DNS in this example. So i will point the "www" for both of my domain names to 192.168.0.31. So it will be something like that:

www.hostpage1.com --> 192.168.0.31

www.hostpage2.com --> 192.168.0.31

Read the rest of this entry →