Forum Moderators: phranque
THANKS
Joshua
Once you set up DNS so that your domains resolves to your static ip address you need to set up a VirtualHost container for each domain you want to host.
NameVirtualHost your.static.ip.address
#
<VirtualHost your.static.ip.address>
DocumentRoot /path/to/files
ServerAdmin root@new_domain.tld
ServerName www.new_domain.tld
ErrorLog /path/to/errorlog
CustomLog /path/to/accesslog combined
</VirtualHost>
#
<VirtualHost your.static.ip.address>
DocumentRoot /path/to/other/files
ServerAdmin root@other_domain.tld
ServerName www.other_domain.tld
ErrorLog /path/to/other/errorlog
CustomLog /path/to/other/accesslog combined
</VirtualHost>
Andreas
<VirtualHost your.static.ip.address>
DocumentRoot /path/to/files
ServerAdmin root@new_domain.tld
ServerName www.new_domain.tld
ErrorLog /path/to/errorlog
CustomLog /path/to/accesslog combined
</VirtualHost>
#
<VirtualHost your.other_static.ip.address>
DocumentRoot /path/to/other/files
ServerAdmin root@other_domain.tld
ServerName www.other_domain.tld
ErrorLog /path/to/other/errorlog
CustomLog /path/to/other/accesslog combined
</VirtualHost>
Notice the missing NameVirtualHost directive. This is an IP based virtual host configuration as opposed to the name base setup in my previous post.
Andreas
Just to expand on the above info a little (I host numerous domains on Apache),
One additional item that I find is a must to add is an alias like:
ServerAlias yourdomain.com
That way either www. or not will get them to the site.
There are many other directives and such that you can place in that file for each virtual domain but that one is important.
-Anon1
Thanks.
Joshua
There are so many possible reasons why it is not working for you that I would be making a weak guess without more information.
Like:
Is the web-server local to you or remote out on the net somewhere?
Is your Win9x server running any firewall type software or hardware?
Is that the same Win9x box that is also hosting the site via Apache?
Can you access it over your local network (if your machines are on one)?
Also after re-reading your first post: the info posted above regarding <VirtualHost> settings would typically be made in the vhosts.conf and not the httpd.conf file. httpd.conf should have a section like this which tells Apache to then process the vhosts.conf file:
#
# After processing this file, Apache will also process the following
# files in order.
#
ResourceConfig conf/defaults.conf
AccessConfig conf/vhosts.conf
-anon1