ServerAlias doesn't seem to be working

Discussion in 'Apache' started by tonyrocks, Aug 6, 2010.

  1. #1
    Ok, here is my setup... I have a windows server with 10 IP addresses....

    on one IP I have iis running on port 80,
    on another IP I have Apache running on port 80.

    My problem is with Apache conf. I run the site, buffalochicken.com....but for some reason, only buffalochicken.com works, not www.buffalochicken.com. Below is my snippet of code from the httpd file..with the ip addressed just changed for the purpose of this post:

    NameVirtualHost 192.168.1.3:80
    <VirtualHost 192.168.1.3>
    	ServerName www.buffalochicken.com
            ServerAlias buffalochicken.com
    	DocumentRoot "C:/Program Files (x86)/Apache Software Foundation/Apache2.2/htdocs/buffalochicken.com"
    	DirectoryIndex index.php
    </VirtualHost>
    
     <VirtualHost 192.168.1.3>
    	ServerName www.someothersite.com
    	ServerAlias someothersite.com
    	DocumentRoot "C:/Program Files (x86)/Apache Software Foundation/Apache2.2/htdocs/"
    	DirectoryIndex index.php
    </VirtualHost>
    
    
    Code (markup):
    Any ideas?
     
    tonyrocks, Aug 6, 2010 IP
  2. tolra

    tolra Active Member

    Messages:
    515
    Likes Received:
    36
    Best Answers:
    1
    Trophy Points:
    80
    #2
    Add the following to your DNS as at the moment www is not resolving to anything.

    
    www CNAME buffalochicken.com.
    
    Code (markup):
     
    tolra, Aug 7, 2010 IP
  3. tonyrocks

    tonyrocks Active Member

    Messages:
    1,574
    Likes Received:
    50
    Best Answers:
    0
    Trophy Points:
    88
    #3
    Crap, Google has tagged the site as malicious. I need to fix that before trying the dns fix. Thanks Tolra, imma try that...makes sense that it should fix my problem. I just noticed the same issue on another site I have hosted on the same ip.

    wish me luck
     
    tonyrocks, Aug 7, 2010 IP