wamp 多域名配置

以添加域名dashu.com爲例:wamp\alias下新建文件dashu.com.configapache

NameVirtualHost dashu.com
<VirtualHost dashu.com>
    DocumentRoot "D:/Program Files/wamp/www/xjdold/"
    ServerName dashu.com
    <Directory "D:/Program Files/wamp/www/xjdold/">
        Options FollowSymLinks Indexes
        AllowOverride All
        Order deny,allow
        Allow from all
        #Require all granted
    </Directory>
</VirtualHost>


<VirtualHost localhost>
    DocumentRoot "D:/Program Files/wamp2.1/www"
    ServerName localhost
    <Directory "D:/Program Files/wamp2.1/www">
        Options FollowSymLinks Indexes
        AllowOverride All
        Order deny,allow
        Allow from all
        #Require all granted
    </Directory>
</VirtualHost>

可能出現的錯誤:ide

1.wamp 多域名配置 只有第一個域名被解析ui

看看virtualHost 前是否少了NameVirtualHost dashu.com,老版本的apache中,沒有NameVirtualHost ,<VirtualHost>標籤就沒什麼做用(新版的Apache已經去除了NameVirtualHost 這個配置)

2.報下面錯誤this

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.spa

Please contact the server administrator, admin@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.code

More information about this error may be available in the server error log.orm

而後查看apache error log發現報錯:configuration error:  couldn't perform authentication. AuthType not setserver

解決方法:若是Apache版本小雨2.4,去掉Require all granted這行,若是大於2.4,就去掉Allow from allblog

相關文章
相關標籤/搜索