Virtual hosting - testing

    Date: 06/12/07 (Apache)    Keywords: no keywords

    I created two name-based virtual hosts


    NameVirtualHost *:80


    ServerName siteone.subX.subY.com
    ServerAdmin me@me.com
    DocumentRoot /www/virtualhosts/siteone
    ErrorLog /var/log/httpd/siteone-error_log
    CustomLog /var/log/httpd/siteone-access_log common



    ServerName sitetwo.subX.subY.com
    ServerAdmin me@me.com
    DocumentRoot /www/virtualhosts/sitetwo
    ErrorLog /var/log/httpd/sitetwo-error_log
    CustomLog /var/log/httpd/sitetwo-access_log common


    Shouldn't I be able to test them by adding entries in my local hosts file, and accessing via http://sitetwo.subX.subY.com? Well, when I do that, the site that displays is actually siteone.subX.subY.com. So it's always displaying the default VH, no matter what domain I use.

    Source: http://apache.livejournal.com/37226.html

« Newb question about Struts2... || "You don't have... »


antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home