Click to See Complete Forum and Search --> : Multiple domains...


stmasi
04-20-2007, 03:18 PM
I'm not sure if this would be the appropriate forum for this issue, but maybe someone out there has the knowledge to answer it.

Do I need a specific web server software in order to host multiple sites on one computer? If not, how can I set up the web server software to know which site to go to when the request is received?

I am running DNS2GO and that part of it works with no problem. However, once the requests hit my box, I need to be able to distinguish between my three domains and redirect the request to the appropriate folder on the hard drive.

Any ideas out there?

Thanx.

sae
04-20-2007, 03:53 PM
apache...the best web server and the one that 90% of the world uses (or something like that they claim)...and it's free!

Znupi
04-20-2007, 05:13 PM
If you use Apache web server, you can use the <VirtualHost> directive in it's configs... http://httpd.apache.org/docs/2.2/vhosts/
A simple example (the way I use vhosts):

# For not-defined requests
<VirtualHost *:80>
ServerAdmin znupi69@gmail.com
DocumentRoot "H:/XAMPP/htdocs/"
ServerName *
</VirtualHost>
# Particular requests...
<VirtualHost *:80>
ServerAdmin znupi69@gmail.com
DocumentRoot "H:/XAMPP/htdocs/example.com/www"
ServerName example.com
</VirtualHost>
<VirtualHost *:80>
ServerAdmin znupi69@gmail.com
DocumentRoot "H:/XAMPP/htdocs/whatever"
ServerName whatever.net
</VirtualHost>
# ... add as many as you want, and don't forget to restart apache after making changes! :)

ray326
04-21-2007, 12:38 AM
The version of IIS that comes with W2003 Server (IIS 6?) can do virtual hosting like that, too, but I've never fiddled with it. I use Apache virtual hosts myself.