Tag Archives: virtualhosts

Getting default site in Apache2 to display a 404

Rather than showing the alphabetically first virtualhost (alphabetically based on file name, if you have one file for each virtualhost, otherwise it will show whatever’s at the top of your single virtualhost file).

<VirtualHost *:80>
    Redirect 404 /.*

I’m getting some errors when trying to do the same with SSL sites, out of time now but will try and sort another day.