Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I am trying to set up virtual hosts on apache2 set up via WAMP. I have set the below code in the vhosts.conf file

<VirtualHost *:80>
    ServerAdmin webmaster@dummy-host2.example.com
    DocumentRoot "C:/wamp/www/inspection/"
    ServerName inspection
    ErrorLog "logs/dummy-host2.example.com-error.log"
    CustomLog "logs/dummy-host2.example.com-access.log" common

The trouble is when I go to inspection it takes me to the WAMP document root not the root of the inspection folder like specified in the DocumentRoot section above.

Where am I going wrong above. I also didn't know if it maybe something overriding it in the httpd.conf file. Any help is much appreciated.

EDIT: I uncommented the include line in httpd.conf which I hadn't seen to do before and now it points to the right place but if I attempt to use the submit button which takes me to http://inspection/confirm.php. In IE it says Cannot display the page and Chrome says no data was transmitted. If I go back to no vhosts it works fine.

share|improve this question
You realize you misspelled inspection in your pasted configuration? –  Michael Hampton Jul 16 '12 at 17:57
fixed the spelling but that wasn't the issue. –  Cody Covey Jul 16 '12 at 18:00

2 Answers 2

Make sure that you have:

  • a NameVirtualHost line in your conf somewhere before the <VirtualHost... block (i.e. directly above it in the same file) and that the server name and port (*:80) match
  • an entry in the hosts file for inspection so that http://inspection/ resolves to your localhost (
  • cleared your browser's cache and cookies
  • restarted Apache
share|improve this answer

Put an actual IP address where you have *:80, and also have a Listen directive for that same IP address.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.