Best practice on where to point ip of server to on multi name-based vhost

undersound asked:

When a single server runs multiple websites being served via name-based vhosts what is best practice to do when this server is accessed by it’s IP address when you don’t want any of the websites shown that are on the server.

My first thought is to create a 000-default file and serve a blank html page but I was wondering if there any other solutions out there.

My answer:


Yes, that is the best practice, to serve a “nothing” page. Indeed, the default site on Ubuntu or Red Hat already does this, so you can just leave it in place and add your own virtual hosts.


View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.