Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Everyone can reach my website by putting my public IP address in the web browser. How can I stop this?

I am using Ubuntu 14.04 server and Apache 2.4

share|improve this question
Why do you want that? What's the problem? – slhck May 24 '14 at 8:46

1 Answer 1

up vote 5 down vote accepted

Obviously you can't make Apache stop listening on this IP, but you can configure a new default vhost to display a blank page (or 403 or redirect or whatever) whenever a request over IP-only comes in. Actually, this is considered good practice.

Just add a new vhost definition, that will be read first by Apache, such as this:

<VirtualHost <your-ip>:80>
   DocumentRoot /var/www/blank

and put an empty index.html into /var/www/blank. To get Apache to read the new vhost first, put it on top of the site-definition file that will be loaded first.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.