Having trouble hosting two website on one server

Discussion in 'Apache' started by brownlie88, Mar 27, 2010.

  1. #1
    I have two websites and im trying to host them both on the one server. However when i type in the urls they both take me to the same website..
    I have a attached a pic. Can you see what im doing wrong?

    http://i790.photobucket.com/albums/yy187/brownlie88/apache.png

    Thanks
     
    brownlie88, Mar 27, 2010 IP
  2. Dominatos

    Dominatos Member

    Messages:
    229
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    40
    #2
    Try to set:
    if you set ServerName [U][B]www[/B][/U].site.com
     
    Dominatos, Mar 27, 2010 IP
  3. RHS-Chris

    RHS-Chris Well-Known Member

    Messages:
    1,007
    Likes Received:
    35
    Best Answers:
    10
    Trophy Points:
    150
    #3
    Try something like this:

    
    <VirtualHost *:80>
        ServerName the-great-wall.com.au
        ServerAlias www.the-great-wall.com.au
        DocumentRoot yourdocroothere
        ServerAdmin webmaster@the-great-wall.com.au
        UseCanonicalName Off
        ErroLog xxxx
        CustomLog xxx
    </VirtualHost>
    
    Code (markup):
    Of course, make the changes necessary for both virtual hosts.

    Chris
     
    RHS-Chris, Mar 27, 2010 IP