科技常识:Apache 多站点虚拟主机配置方法

2021-04-14 19:02:26
导读 今天小编跟大家讲解下有关科技常识:Apache 多站点虚拟主机配置方法,相信小伙伴们对这个话题应该也很关注吧,小编也收集到了有关科技常识

今天小编跟大家讲解下有关科技常识:Apache 多站点虚拟主机配置方法,相信小伙伴们对这个话题应该也很关注吧,小编也收集到了有关科技常识:Apache 多站点虚拟主机配置方法的相关资料,希望小伙伴会喜欢也能够帮助大家。

修改配置文件 conf/httpd.conf 1.加入下面两句 NameVirtualHost *:80 Include conf/vhosts 2.在conf目录中建立vhosts目录 然后在 vhosts 目录下面建立相应的站点配置文件 如建立 hhj.aidi.net.cn.conf 文件 内容:复制代码 代码如下:<VirtualHost *:80> ServerAdmin hhj@live.it ServerName www.hhj.aidi.net.cn ServerAlias hhj.aidi.net.cn DocumentRoot"F:\wwwroot\hhj.aidi.net.cn"DirectoryIndex index.html index.htm index.php ErrorLog logs/hhj.aidi.net.cn-error_log.log CustomLog logs/hhj.aidi.net.cn-access_log.log common <Directory"F:\wwwroot\hhj.aidi.net.cn"> AllowOverride All Options FollowSymLinks Order Deny,Allow Allow from all </Directory> </VirtualHost> 3.重启apache服务

来源:爱蒂网

免责声明:本文由用户上传,如有侵权请联系删除!

猜你喜欢

最新文章