apache下多个域名绑定域名|APACHE下多个域名绑定到一个目录的方法

更新时间:2019-05-14    来源:apache    手机版     字体:

【www.bbyears.com--apache】

 http.conf中如何修改。比如域名分别为www.site1.com;site1.com;www.111cn.net;目录为D:/PC_webserver/phproot/site 下面标准写法该如何写

 代码如下

ServerName www.111cn.net

DocumentRoot "D:/PC_webserver/phproot/site"

解决方法

 

 代码如下

ServerName www.111cn.net

ServerAlias site1.com

ServerAlias www.site1.com


DocumentRoot "D:/PC_webserver/phproot/site"

其实还有一种办法,我们直接这样改进

 代码如下


    ServerAdmin webmaster@dummy-host.www.phpStudy.net
    DocumentRoot "E:wwwcgd"
    ServerAlias www.111cn.net  111cn.net

中间以空格分开即可。

本文来源:http://www.bbyears.com/jiaocheng/51077.html

热门标签

更多>>

本类排行