up vote 0 down vote favorite
share [g+] share [fb]

I have a current website on an Apache server (foo.com) and I want the same server to serve a new site (bar.com), is this the correct way to setup my virtual hosts?


<VirtualHost *:80>
    ServerName foo.com
    ServerAlias www.foo.com
    Include conf.d/foo.conf
</VirtualHost>

<VirtualHost *:80>
    ServerName bar.com
    ServerAlias www.bar.com
    Include conf.d/bar.conf
</VirtualHost>

I'm hesitant to do an /etc/init.d/httpd reload without someone double checking! :)

link|improve this question
I am assuming you have a NameVirtualHost somewhere in your configuration already? – Zoredache Mar 17 '10 at 18:38
feedback

1 Answer

That looks correct ! You can also always run

 apache2ctl configtest

to make sure the apache config syntax is correct

link|improve this answer
feedback

Your Answer

 
or
required, but never shown