Setting up multiple domains on one host

Discussion in 'Apache' started by KingOle, Feb 20, 2011.

  1. #1
    Hey all,

    I have a VPS and I'm trying to host multiple domain names on it. I've created two Virtual Hosts in my httpd.conf file like:

    <VirtualHost *>
    DocumentRoot /home/ole/public_html
    ServerName wispengine.com
    <Directory /home/ole/public_html>
    allow from all
    Options +Indexes
    </Directory>
    </VirtualHost>

    <VirtualHost *>
    DocumentRoot /home/ole/public_html/vwc
    ServerName virtualworldscommunity.com
    <Directory "/home/ole/public_html/vwc">
    allow from all
    Options +Indexes
    </Directory>
    </VirtualHost>

    Only problem is they both redirect to /home/ole/public_html and not to the separate ones like I specified in the DocumentRoot.

    You can view both domain names and see they take you to the same page. If I switch the VH around in order (i.e. put virtualworldscommunity before wispengine.com) it will then point to /home/ole/public_html/vwc

    Any help with this would be appreciated :p Its been doing my head in!
     
    KingOle, Feb 20, 2011 IP