Linode Forum Index Linode Forum
Linode Community Forums
 


non-www takes me to the default index.html

Click here to go to the original topic

 
       Linode Forum Index -> Web Servers and Web App Development
Author Message
mrm83



Joined: 01 Jan 2012
Posts: 7

Posted: Sun Jan 01, 2012 8:00 pm    Post subject: non-www takes me to the default index.html  

noob here and cant seem to figure out why site.com takes me to the default index.html but www.site.com takes me to my working site.

in my virtual host file, ive already specified the ServerAlias to have both www.site.com and site.com, but site.com still takes me to default..
Back to top  
voidfaction



Joined: 21 Mar 2011
Posts: 8
Location: Noblesville, IN

Posted: Sun Jan 01, 2012 9:32 pm    Post subject:  

Do you have both set in your DNS manager?
Back to top  
mrm83



Joined: 01 Jan 2012
Posts: 7

Posted: Sun Jan 01, 2012 11:37 pm    Post subject:  

i have www set and blank set.
blank is non-www right?
Back to top  
voidfaction



Joined: 21 Mar 2011
Posts: 8
Location: Noblesville, IN

Posted: Mon Jan 02, 2012 8:47 am    Post subject:  

Yes blank would be the non-www.

Have you got the default site disabled?
a2dissite default
Back to top  
mrm83



Joined: 01 Jan 2012
Posts: 7

Posted: Mon Jan 02, 2012 12:50 pm    Post subject:  

ah! that did the trick! thanks =)
Back to top  
glg



Joined: 09 Jan 2009
Posts: 505

Posted: Mon Jan 02, 2012 1:25 pm    Post subject:  

You might want the default in there, as that can be your "dumping ground" for someone hitting your websites in an odd way (IP, some other name), rather than whatever the first site is.

What's likely your real problem is that the default site listed site.com in the ServerName or ServerAlias fields.
Back to top  
mrm83



Joined: 01 Jan 2012
Posts: 7

Posted: Mon Jan 02, 2012 1:34 pm    Post subject:  

i just looked at the default virtual host file but there is no server name or server alias..
Back to top  
 
       Linode Forum Index -> Web Servers and Web App Development
Page 1 of 1