Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Wed Mar 16, 2011 10:54 am 
Offline
Senior Newbie

Joined: Wed Mar 16, 2011 10:08 am
Posts: 11
Hi,

I have my own domain name, say example.com

My linode responds to example.com address, but it also responds to my liXXX.members.linode.com name. How to restrict my linode to respond to example.com only?


Top
   
PostPosted: Wed Mar 16, 2011 11:10 am 
Offline
Senior Member

Joined: Fri Jan 09, 2009 5:32 pm
Posts: 634
dmitry_orlov wrote:
Hi,

I have my own domain name, say example.com

My linode responds to example.com address, but it also responds to my liXXX.members.linode.com name. How to restrict my linode to respond to example.com only?


Using that DNS name or your IP will by default go to the first virtual host that apache finds. So, put in a "default" virtual host that goes nowhere before your virtual host for your domain.


Top
   
PostPosted: Thu Mar 17, 2011 8:33 am 
Offline
Senior Newbie

Joined: Wed Mar 16, 2011 10:08 am
Posts: 11
glg wrote:
dmitry_orlov wrote:
Hi,

I have my own domain name, say example.com

My linode responds to example.com address, but it also responds to my liXXX.members.linode.com name. How to restrict my linode to respond to example.com only?


Using that DNS name or your IP will by default go to the first virtual host that apache finds. So, put in a "default" virtual host that goes nowhere before your virtual host for your domain.


I have a default apache web site in /etc/apache2/sites-enabled
Does it mean that I should remove everything under <VirtualHost *:80> section?
Code:
<VirtualHost *:80>
    # noop
</VirtualHost>


Thanks again!


Top
   
 Post subject:
PostPosted: Thu Mar 17, 2011 8:52 am 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
You should have a file called 000-default in /etc/apache2/sites-enabled/ apache loads virtual host files in name order so 000 comes first, the contents can be whatever you like but I suggest something like

Code:
<VirtualHost *:80>
RewriteEngine On
RewriteRule ^(.*)$ http://www.yourdomain.com/ [R=301,L]
</VirtualHost>


That will redirect all requests to www.yourdomain.com

_________________
Paid support
How to ask for help
1. Give details of your problem
2. Post any errors
3. Post relevant logs.
4. Don't hide details i.e. your domain, it just makes things harder
5. Be polite or you'll be eaten by a grue


Top
   
 Post subject:
PostPosted: Thu Mar 17, 2011 9:18 am 
Offline
Senior Newbie

Joined: Wed Mar 16, 2011 10:08 am
Posts: 11
obs wrote:
You should have a file called 000-default in /etc/apache2/sites-enabled/ apache loads virtual host files in name order so 000 comes first, the contents can be whatever you like but I suggest something like

Code:
<VirtualHost *:80>
RewriteEngine On
RewriteRule ^(.*)$ http://www.yourdomain.com/ [R=301,L]
</VirtualHost>


That will redirect all requests to www.yourdomain.com


Thanks!


Top
   
 Post subject:
PostPosted: Thu Mar 17, 2011 11:36 am 
Offline
Senior Newbie

Joined: Fri Apr 09, 2010 1:53 pm
Posts: 17
Concerning this I think I found a little easteregg. :D

My Linode responds with

Quote:
(¬_¬)


even though Cherokee is not configured to respond to that.
All neighbours of mine respond with their website or do not respond.

Or is this possibly a cherokee easteregg? :?


Top
   
 Post subject:
PostPosted: Wed Apr 20, 2011 11:54 am 
Offline
Senior Member

Joined: Sat Jun 12, 2010 4:53 pm
Posts: 77
How can I change this so it does not redirect, but rather gives like a 404, if you go to the members.linode url?

I want to keep my apache default as is, for other purposes.


Top
   
 Post subject:
PostPosted: Fri Apr 22, 2011 7:09 am 
Offline
Junior Member

Joined: Mon Apr 11, 2011 9:49 pm
Posts: 49
hmm.. this brings up a valid point, any way we can make it show;

<VirtualHost liXXX.members.linode.com:80>
# noop
</VirtualHost>

So that way guessing my linode id won't show that I even own a website?

Cause when I type in my linode address, it goes to my default website... !


Top
   
 Post subject:
PostPosted: Sun Apr 24, 2011 1:40 am 
Offline
Senior Member

Joined: Sat May 03, 2008 4:01 pm
Posts: 569
Website: http://www.mattnordhoff.com/
The members.linode.com hostname doesn't contain any more information than can be obtained from knowing your IP address. Trying to hide it is completely pointless.

Sure, it shows that it's a Linode IP, but so does a simple whois.

_________________
Matt Nordhoff (aka Peng on IRC)


Top
   
 Post subject:
PostPosted: Sun Apr 24, 2011 8:03 am 
Offline
Senior Member
User avatar

Joined: Tue Nov 24, 2009 1:59 pm
Posts: 362
I heard some web crawlers give you negative points if same website is available from more than one domainname. No idea if that's true, nor if it's a good idea... but if you really want to not have the main site on the address, your best bet would be

Code:
# if you don't have this line in the main config file, uncomment:
# NameVirtualHost *:80

<VirtualHost *:80>
# no ServerName, the catch-all "default" that grabs liXX-XXX, http://your.ip.addr.here/, and such
# uncomment one of
# Redirect / http://realsitename.com/
# or
# DocumentRoot /path/to/blank/page/or/something
</VirtualHost>

<VirtualHost *:80>
ServerName realsitename.com
Redirect / http://www.realsitename.com/
</VirtualHost>

<VirtualHost *:80>
ServerName www.realsitename.com
DocumentRoot /path/to/site
</VirtualHost>

<VirtualHost *:80>
ServerName www.othersiteIhostifany.com
DocumentRoot /path/to/othersite
</VirtualHost>

<VirtualHost *:80>
ServerName othersiteIhostifany.com
Redirect / http://www.othersiteIhostifany.com/
</VirtualHost>
# so on


Of course, if you prefer, make the www. version redirect to the no-www instead.

PS. Sorry for the edit, I'm sleepy and made a mistake. ;)

_________________
rsk, providing useless advice on the Internet since 2005.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group