wamp 多域名配置

以添加域名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

 

转载于:https://www.cnblogs.com/jly553/p/4793634.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值