Forum Moderators: phranque

Message Too Old, No Replies

Adding a Second Domain Name via Virtual Host

         

aRGeeBee

7:16 pm on Aug 6, 2010 (gmt 0)

10+ Year Member



I have a Redhat server running Apache and I need to host a second website on it. I tried setting up virtual hosts by editing the httpd.conf file but the new url just sends me straight to my main website.
Here is the relevant code from my httpd.conf file:

NameVirtualHost *:80

<VirtualHost *:80>
ServerName www.mywebsite.com
ServerAlias mywebsite.com *.mywebsite.com
DocumentRoot /home/user/public_html
</VirtualHost>

<VirtualHost *:80>
ServerName www.newwebsite.com
DocumentRoot /home/user/public_html/newwebsite
</VirtualHost>


Is there a step that I am missing?

jdMorgan

2:06 pm on Aug 10, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Did you restart the server after making this change?

Jim