Tricky Gotcha Editing Virtual Hosts on Apache

Here’s a really simple but sneaky gotcha for if you are trying to edit your virtual hosts file with XAMPP but for some reason, it just isn’t working.

Of course, first check to make sure you aren’t writing anything that would never work :-) but one thing to also check is that you are in fact editing the correct vhosts file because there are two. There is one here (assuming a similar installation root): C:\xampp\apache\conf\original\extra\httpd-vhosts.conf and another here: C:\xampp\apache\conf\extra\httpd-vhosts.conf

Can you guess which one is a dummy and for reference?

It’s the first one, so if you want to see your changes do anything useful, make sure you edit the second and naturally, stop and start your Apache daemon, too.

Hi! Did you find this useful or interesting? I have an email list coming soon, but in the meantime, if you ready anything you fancy chatting about, I would love to hear from you. You can contact me here or at stephen ‘at’