WAMP server not running after enabling httpd-vhosts.conf

前端 未结 3 1775
野的像风
野的像风 2021-02-13 20:29

I tried enabling Virtual Host on my WAMP installation, but WAMP server will not run if I enable http-vhosts.conf, and the icon remains orange.

Here is my hosts file:

3条回答
  •  谎友^
    谎友^ (楼主)
    2021-02-13 20:50

    OK I feel this my duty to put this...

    I too went on a rampage of checking forms and doing things like

    Listen *:80 & NameVirtualHost *:80 but found that this was not necessary, the default settings were fine for me.

    the problem started when I tried to put in my vhost declaration

    
        DocumentRoot 'c:\wamp\www\media_weber_edu\public'
        ServerName media.weber.dev
        
            Options Indexes FollowSymLinks MultiViews
            AllowOverride all
        <\Directory>
    
    

    here lied the problem

    <\Directory> vs

    A huge help to finding this was running C:\wamp\bin\apache\apache2.2.22\bin\httpd.exe

    this gave me an error like this

    httpd.exe: Syntax error on line 469 of C:/wamp/bin/apache/apache2.2.22/conf/httpd.conf: Syntax error on line 42 of C:/wamp/bin/apache/apache2.2.22/conf/extra/httpd-vhosts.conf: Expected  but saw 
    

    So this may not be the exact problem but I hope this will help those in the future. So take a deep breath... glue the hair back on your head... its going to be ok :)

提交回复
热议问题