AMoralGhost
AMoralGhost

Reputation: 1

'httpd-vhost.conf' breaks Wamp?

This is my first post...

I am attempting to host a development website from my laptop using Wamp; my goal is to install Wordpress and have users log in from there homes...

localhost works perfectly until I edit my 'httpd-vhost.conf' file to include the following...

<VirtualHost *:80>
    SeverAdmin webmaster@localhost
    ServerName localhost
    DocumentRoot C:/Program Files/WampServer2/www
    ErrorLog "C:/Program Files/WampServer2/www/logs/error.log"
    CustomLog "C:/Program Files/WampServer2/www/logs/access.log" common
</VirtualHost>

Once I restart Wamp the icon stays orange. If I attempt to put Wamp online, an alert titled 'Aestan Tray Menu' stating "Could not execute menu item (internal error). [Exception] Could not preform service action: the service has not been started".

When I run 'httpd.exe' a command window opens then immediately closes before I can read it. I've tried various formats to <VirtualHost *:80> with no avail, however once I comment out my changes I am able to successfully restart Wamp and access localhost.

I haven't been able to find post about this problem anywhere! Thanks!

Upvotes: 0

Views: 581

Answers (2)

Tony_GR
Tony_GR

Reputation: 81

I am not sure this is so complex. I know the original post is very old but just for those with a similar issue since I had it this morning.

To see the error, you run httpd.exe from within the command prompt. Just open a command prompt and then cd into the folder that contains httpd.exe, then type httpd.exe (i.e. don't just double click it from within the folder).

The result should tell you where the error lies. In my case, it was a syntax error inside the vhosts file.

Upvotes: 1

Sarah Kemp
Sarah Kemp

Reputation: 2670

I suspect your problem is the unquoted DocumentRoot with a space in it. Try:

<VirtualHost *:80>
    SeverAdmin webmaster@localhost
    ServerName localhost
    DocumentRoot "C:/Program Files/WampServer2/www" # <- quotes added around this line
    ErrorLog "C:/Program Files/WampServer2/www/logs/error.log"
    CustomLog "C:/Program Files/WampServer2/www/logs/access.log" common
</VirtualHost>

Upvotes: 0

Related Questions