Using one server to host multiple domains?

Nullity

Senior member
Oct 13, 1999
837
0
0
I figured this is more hardware than networking..

I've been playing around with a dual P3 550 Win2k server and I was wondering if and how a single server can host mutliple domains. I do have a domain and 1 IP address on this server and it works like a charm. I was just wondering what would happen if I got another domain..would I need a seperate server? If it is just DNS, what would I need to add or change?

Thanks,
Null
 

1KrazyFool

Senior member
Oct 10, 1999
323
0
0
It would depend on what type of website(s) you would be running. If they were database heavy, you might run into problems. If not, you can host many websites on one machine with one IP address. This however, depends on the web server software. I am not familiar with IIS 5. I think it can run more than one website, but I am not sure. Apache can however, do this quite well under *nix, like linux. It's rather easy to do actually. In any case, as long as you got an IP, you can point as many domains at is as you wish, I would guess. How the server responds depends on the web server software.
 
Oct 9, 1999
15,216
3
81
if you got multiple IP's then you can point each IP to each subdirectory under IIS to have as a domain.
If you got one IP.. then its a little more tricky, you got to route the request for the domain to the subdomain. It can be done though.
As the person above said, its easier in *nix.. under Apache.. see if you can find a version of Apache under NT.
 

Nullity

Senior member
Oct 13, 1999
837
0
0
Actually, I have been using Apache for Win32 on this server. How would I go about setting up multiple domains on a single IP with Apache?

Thanks for the info!
Null
 

1KrazyFool

Senior member
Oct 10, 1999
323
0
0
umm, I haven't used apache under Win32 before. But if it has an httpd.conf (or similar config file with lots of commands) you can probably do it. Check out http://www.apache.org for more info. You want to search under VirtualHosts. Read those thru. If you do have a config file like under linux, you basically do this:

<VirtualHost 192.168.0.100> //your IP address here
ServerName www.domain.com //your domain name
DocumentRoot c:\web1 //this may be different, I am guessing here
//other directives can go here too
</VirtualHost>
<VirtualHost 192.168.0.100> //same IP
ServerName www.domain2.com //other name
DoucmentRoot c:\web2 //other sites files
</VirtualHost>

Hopefully that'll make some sense after reading the apache docs and your config files.

To test it out, register for a free domain name and try it out! You should see two different pages depending on what site you typed in your browser.

[edit] Make sure you have different index.html pages for each site![/edit]