Output of http://MYIPADDRESS, what to do with it?

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

6 Replies

Why would anyone connect to your web server by it's IP addr?

Redirect it to NSA's homepage or Midget Bowling.

I put "what?" into index.html

@vonskippy:

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.

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)

Enable mod rewrite.

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

`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`

Everyone but you will received Apache: 404 Not Found

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct