我是靠谱客的博主 标致高山,这篇文章主要介绍Apache 多站点虚拟主机配置方法,现在分享给大家,希望可以做个参考。

修改配置文件 conf/httpd.conf
1.加入下面两句
NameVirtualHost *:80
Include conf/vhosts
2.在conf目录中建立vhosts目录
然后在 vhosts 目录下面建立相应的站点配置文件
如建立 hhj.uoften.com.conf 文件
内容:

复制代码 代码如下:

<VirtualHost *:80>
ServerAdmin hhj@live.it
ServerName www.hhj.uoften.com
ServerAlias hhj.uoften.com
DocumentRoot "F:\wwwroot\hhj.uoften.com"
DirectoryIndex index.html index.htm index.php
ErrorLog logs/hhj.uoften.com-error_log.log
CustomLog logs/hhj.uoften.com-access_log.log common
<Directory "F:\wwwroot\hhj.uoften.com">
AllowOverride All
Options FollowSymLinks
Order Deny,Allow
Allow from all
</Directory>
</VirtualHost>

3.重启apache服务

最后

以上就是标致高山最近收集整理的关于Apache 多站点虚拟主机配置方法的全部内容,更多相关Apache内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(125)

评论列表共有 0 条评论

立即
投稿
返回
顶部