网站运维:Windows的xampp的Apache配置虚拟主机

1、配置httpd.conf

在c:\xampp\apache\conf目录下,打开httpd.conf
改成下面这样

# Virtual hosts……虚拟主机
Include conf/extra/httpd-vhosts.conf
#DocumentRoot "c:/xampp/htdocs"

2、配置httpd-vhosts.conf

在C:\xampp\apache\conf\extra文件夹下,打开httpd-vhosts.conf
添加

#端口(必须)
<VirtualHost *:80>
#网站管理员邮箱(非必须)
		ServerAdmin haha@qq.com
 #绑定的子域名(必须)
        ServerName te.cloudsystem.work
  #子域名目录 (必须)  
        DocumentRoot "C:/xampp/htdocs/te/"
#错误日志(非必须)
#错误日志在C:/xampp/htdocs/te/logs文件夹
		ErrorLog "C:/xampp/htdocs/te/logs/te.cloudsystem.work-error.log"
#访问日志(非必须)
#访问日志在C:/xampp/htdocs/te/logs文件夹
  	  	CustomLog "C:/xampp/htdocs/te/logs/te.cloudsystem.work-access.log" common
</VirtualHost>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值