Vhost makes me go beserk

Discussion in 'Apache' started by obeegoone, Sep 6, 2009.

  1. #1
    Okey so after like 4 weeks trying it still wont work and i must get my new site up and runnign today :/

    Only problem is my vhost

    I want to run 2 sites from same computer with 2 different domain

    This is my config

    # Use name-based virtual hosting.
    #
    NameVirtualHost *:80

    <VirtualHost *:80>
    DocumentRoot "C:\xampp\htdocs\site1"
    ServerName site1.com
    <Directory "C:\xampp\htdocs\site1">
    </Directory>
    </VirtualHost>


    <VirtualHost *:80>
    DocumentRoot "C:\xampp\htdocs\site2"
    ServerName www.site2.com
    <Directory "C:\xampp\htdocs\site2>
    </Directory>
    </VirtualHost>

    Okey here is the thing site1 works perfect, but site2 is some problems with

    If i write www.site2.com it works perfect, but if i only write site.com i get to site1 :/

    Please anybody help me sort this problem
     
    obeegoone, Sep 6, 2009 IP