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
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
</VirtualHost>
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.