分享web开发知识

注册/登录|最近发布|今日推荐

主页 IT知识网页技术软件开发前端开发代码编程运营维护技术分享教程案例
当前位置:首页 > IT知识

进行Apache 多站点虚拟主机配置的步骤

发布时间:2023-09-06 02:29责任编辑:郭大石关键词:配置虚拟主机

Apache 多站点虚拟主机配置方法, 有这类需要的朋友可以参考下。 修改配置文件 conf/httpd.conf 
1.加入下面两句 
NameVirtualHost *:80 
Include conf/vhosts 
2.在conf目录中建立vhosts目录 
然后在 vhosts 目录下面建立相应的站点配置文件 FTP
如建立 hhj.jb51.net.conf 文件 
内容:
复制代码 代码如下:
<VirtualHost *:80> 
ServerAdmin hhj@live.it 
ServerName www.hhj.jb51.net 
ServerAlias hhj.jb51.net 
DocumentRoot "F:\wwwroot\hhj.jb51.net" 
DirectoryIndex index.html index.htm index.php 
ErrorLog logs/hhj.jb51.net-error_log.log 
CustomLog logs/hhj.jb51.net-access_log.log common 
<Directory "F:\wwwroot\hhj.jb51.net"> 
AllowOverride All 
Options FollowSymLinks 
Order Deny,Allow 
Allow from all 
</Directory> 
</VirtualHost> 

3.重启apache服务

进行Apache 多站点虚拟主机配置的步骤

原文地址:https://www.cnblogs.com/03ngnntds/p/10249738.html

知识推荐

我的编程学习网——分享web前端后端开发技术知识。 垃圾信息处理邮箱 tousu563@163.com 网站地图
icp备案号 闽ICP备2023006418号-8 不良信息举报平台 互联网安全管理备案 Copyright 2023 www.wodecom.cn All Rights Reserved