Running Multiple sites with multiple domains apache
Posted
by
PsychoData
on Server Fault
See other posts from Server Fault
or by PsychoData
Published on 2013-10-22T08:22:45Z
Indexed on
2013/10/22
9:58 UTC
Read the original article
Hit count: 270
I am having a rough time running apache and using multiple domain names
here is a snippet of my config file. I keep getting a error saying that NameVirtualHost has no VirtualHosts. I want them both running on the same IP and I'm not sure why this doesn't work. I've been digging through the documentation for VirtualHosts, NameVirtualHost, and apache's page about name based virtual hosting.
That example in the name based page is almost exactly my config! What am I doing wrong?
Listen *:80
NameVirtualHost *:80
<VirtualHost *:80>
ServerName www.sample1.net
DocumentRoot /var/www/sample1-net
</VirtualHost>
<VirtualHost *:80>
ServerName www.example2.net
DocumentRoot /var/www/example2-net
</VirtualHost>
© Server Fault or respective owner