PDA

View Full Version : multiple domains, one server


yawningdog
12-18-2007, 08:49 PM
So I have a web server (Apache 2.2 on Slackware 12). How do I host two domain websites (ex. this.com and that.org) on the same server?

yawningdog
12-19-2007, 01:31 PM
Found it. It involves a thing called name-based virtual hosts. Apparently it involves little more than adding a few lines to the httpd.conf file. Ex... NameVirtualHost *:80

<VirtualHost *:80>
ServerName www.domain.tld
ServerAlias domain.tld *.domain.tld
DocumentRoot /www/domain
</VirtualHost>

<VirtualHost *:80>
ServerName www.otherdomain.tld
DocumentRoot /www/otherdomain
</VirtualHost>
The info (for slackware distro) is installed in /var/www/htdocs/manual/vhosts/name-based.html

If anyone is interested, that is.