Prevent members.linode.com access
How can I prevent my website from being accessed through
Many thanks, and sorry if this was the wrong section
Alex
5 Replies
name-based virtual hostDeny from all
@act4:
How can I prevent my website from being accessed through
.members.linode.com? Google has started indexing this second version of my website and I do not want to run into any duplicate content issues. Is this enabled by default? I'm not seeing anything if I try to go tohttp://linodexxxxxx.members.linode.com (as seen on the dashboard under Linodes » linodexxxxxx) orhttp://newarkxxx.members.linode.com , but maybe I'm using the wrong address. Or, maybe my current virtualhost settings are preventing this?
That has a simple page which catches any page attempt and displays a simple page indicating that the site they are attempting is either offline or no longer supported. It provides the URI that was attempted and some simple contact info, Nothing else.
First entry in my vhosts.conf file is an unnamed (No ServerName or ServerAlias):
<virtualhost *:80="">ServerAdmin "webmaster at domain.com"
DocumentRoot /www/vhosts/junk
ErrorLog logs/junk.errors
CustomLog logs/junk.combined combined</virtualhost>
The log files provide a good list of hack attempts since a lot of bots used IP based attempts.
Even if there is only 1 web page for the server, I still set it up this way.
Also, you can use a mod_rewrite to force access to your sites to be the hostname that you want it to be accessed by, keeping indexing consistent as well. This will help with search engine listings.
If you prefer everything be
RewriteCond %{HTTP_HOST} !^(.*)\.hostname\.tld$ [NC]
RewriteRule ^(.*)$ http://www.hostname.tld/$1 [R=301,L]
You can do it the other way around too if you choose.