码迷,mamicode.com
首页 > 其他好文 > 详细

wamp 多域名配置

时间:2015-09-09 09:40:01      阅读:150      评论:0      收藏:0      [点我收藏+]

标签:

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

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>

可能出现的错误:

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

看看virtualHost 前是否少了NameVirtualHost dashu.com,老版本的apache中,没有NameVirtualHost ,<VirtualHost>标签就没什么作用(新版的Apache已经去除了NameVirtualHost 这个配置)

2.报下面错误

Internal Server Error

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

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.

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

然后查看apache error log发现报错:configuration error:  couldn‘t perform authentication. AuthType not set

解决方法:如果Apache版本小雨2.4,去掉Require all granted这行,如果大于2.4,就去掉Allow from all

 

wamp 多域名配置

标签:

原文地址:http://www.cnblogs.com/jly553/p/4793634.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!