Skip to main content
July 1, 2010
Answered

Virtual Hosts Problem

  • July 1, 2010
  • 2 replies
  • 528 views

Hi All,

I have been going through David Powers yet to be published book on Dreamwever CS5 with PHP, via the Creative Edge website and have got to the point of creating virtual hosts for my websites. I have added the lines below to httpd-vhosts.conf as stated in the book:

<Directory C:/vhosts>

Order Deny,Allow

Allow from all

</Directory>


and now Apache will not start (through XAMPP Control Panel).  If I remove these lines and Apache starts OK again. The Error Log contains the line:

"httpd.exe: Syntax error on line 484 of C:/xampp/apache/conf/httpd.conf: Syntax error on line 53 of C:/xampp/apache/conf/extra/httpd-vhosts.conf: </Directory> without matching <Directory> section"

I have tried a few things (including changing the C:/ to C:\) but to no effect. The exact same lines above are also in his previous book, Dreamweaver CS4 with CSS, Ajax and PHP, so it cannot be a typing error.

I am stuck, any ideas ?

I am using Windows 7 Home Premium 64-bit with XAMPP 1.7.3.

Cheers,

Alan Taylor

England

This topic has been closed for replies.
Correct answer David_Powers

Alan contacted me through the Rough Cuts feedback system. The problem was solved by reinstalling XAMPP, but the actual cause remains a mystery. I'm marking this thread as "assumed answered".

2 replies

August 31, 2010

I've spent two days having similar problems and found the advice/explanation in a comment from 'Basit' useful here if anyone else needs help. He recommends renaming the index.php and index.html files in xampp/htdocs. My page displayed fine in the browser after.

David_Powers
David_PowersCorrect answer
Inspiring
July 3, 2010

Alan contacted me through the Rough Cuts feedback system. The problem was solved by reinstalling XAMPP, but the actual cause remains a mystery. I'm marking this thread as "assumed answered".