RSS Feed for This PostCurrent Article

Apache Tip: Make a Dummy Virtual Host

With Apache httpd, any requests that come in that don’t match a VirtualHost stanza get serviced by the first VirtualHost available. You can often test this by browsing with your web server’s IP address. What site do you see? Is that what you want people to see when they didn’t know what they wanted to find?

My suggestion: create a “dummy” virtual host that will return a blank page, or redirect to a known place. Put it first in the list of virtual hosts so that visitors get to see what you want them to see, not some other web site.

| Comments

Trackback URL

Post a Comment

 

Please note that while in principle I don't mind promotion of a non-personal web site or blog in the fields below, any comments that are off-topic, derogatory, or spam-like will likely be removed at my discretion.