Wampserver 403 on named virtual hosts outside of /www

后端 未结 5 1322
栀梦
栀梦 2021-02-05 21:36

Wampserver tells me accessed denied when I try making a virtual host outside of the c:/wamp/www/ directory. I can make one fine within that directory. Even making a symbolic lin

5条回答
  •  忘掉有多难
    2021-02-05 21:59

    If you tried all the .conf edits above and none worked, try the following additional steps:

    1) Make sure DocumentRoot and locations are the same!

    2) Double check "ServerName" domain spelling within your tags, and also check spelling of domain is the same in the HOST file (windows\system32\drivers\etc\hosts):

    Example:

    
        DocumentRoot "D:/vhost_directory/website_directory"
        ServerName mywebsite.local
        
            Options Indexes FollowSymLinks
            AllowOverride All
            Require all granted
        
    
    

    3) Check conf files syntax:

    cd \wamp\bin\apache\apache2.4.9\bin
    httpd -t
    

    4) Fix conf file errors until you get the output:

    Syntax OK
    

    5) Refresh domain name cache (must run console as administrator):

    net stop dnscache
    net start dnscache
    

    6) Restart Apache service or Restart All Services on WAMP

提交回复
热议问题