Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Wed Feb 09, 2011 7:59 pm 
Offline
Senior Newbie

Joined: Wed Feb 09, 2011 7:44 pm
Posts: 9
Website: http://emken.biz
Hi everybody.

I just picked up my Linode yesterday. I have it all setup with the LAMP stack and a couple of virtual hosts for domains I own.

This is the first non-managed web server I have used in probably about six years or so, so it's been a little rough after sitting behind Ubuntu and Windows desktops, rarely using the terminals.

I'll get to the point. What do most people (admins/IT) do when a website is accessed directly from the servers IP address? For example, when my IP address is entered into a browser I get the default "It works" index.html page located in /var/www

So what do most people do or what is a good thing to do with this situation? Should I create a symbolic link to one of my other websites directory? Or what are some other better options?

Thanks, Mike


Top
   
 Post subject:
PostPosted: Wed Feb 09, 2011 8:27 pm 
Offline
Senior Member
User avatar

Joined: Sun Dec 27, 2009 11:12 pm
Posts: 1038
Location: Colorado, USA
Why would anyone connect to your web server by it's IP addr?

Redirect it to NSA's homepage or Midget Bowling.


Top
   
 Post subject:
PostPosted: Wed Feb 09, 2011 8:55 pm 
Offline
Senior Member

Joined: Fri Jan 09, 2009 5:32 pm
Posts: 634
I put "what?" into index.html


Top
   
 Post subject:
PostPosted: Thu Feb 10, 2011 2:24 am 
Offline
Senior Newbie

Joined: Wed Feb 09, 2011 7:44 pm
Posts: 9
Website: http://emken.biz
vonskippy wrote:
Why would anyone connect to your web server by it's IP addr?


Yuh know, I don't know ha. I was just wondering I guess if there was some standard that most people conform to, to handle the IP address.


Top
   
 Post subject:
PostPosted: Thu Feb 10, 2011 3:24 am 
Offline
Senior Member

Joined: Fri May 02, 2008 8:44 pm
Posts: 1121
The usual options:

Leave it blank.
Redirect to your main website.
Post a little message that nobody will see.

Other options of increasing nastiness:

Redirect to Google or some other benign website.
Embed this video.
Redirect in an infinite loop.
Redirect to some three-letter agency to scare the visitor.
Redirect to all three-letter agencies at the same time, using a large number of popups.
Link to random websites of questionable legality, causing the visitor to get busted by one of the aforementioned three-letter agencies.

After all, only bad guys type IP addresses into their browsers, right? 8)


Top
   
 Post subject:
PostPosted: Thu Feb 10, 2011 1:19 pm 
Offline
Senior Member

Joined: Fri Jan 09, 2009 5:32 pm
Posts: 634
hybinet wrote:
Embed this video.


:lol:


Top
   
 Post subject:
PostPosted: Thu Feb 10, 2011 1:51 pm 
Offline
Senior Newbie

Joined: Thu Dec 17, 2009 2:26 pm
Posts: 10
Enable mod rewrite.

Create a vhost config file so that its name appears first alphabetically.

<code>

<VirtualHost *:80>

CustomLog /path/to/access.log combined

RewriteEngine On

RewriteLog /path/to/rewrite.log
RewriteLogLevel 4

RewriteCond %{REMOTE_ADDR} !^127.0.0.1$
RewriteCond %{REMOTE_ADDR} !^put your ip here$

RewriteRule .* - [R=404]

KeepAlive Off

</VirtualHost>

</code>

Everyone but you will received Apache: 404 Not Found


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


Who is online

Users browsing this forum: No registered users and 0 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