xampp apache 本机多虚拟机配置

xampp 3.2.2


C:\Windows\System32\drivers\etc\hosts

hosts文件增加

127.0.0.1       www.test1.com
127.0.0.1       www.test2.com
127.0.0.1       www.test3.com
127.0.0.1       www.test4.com
127.0.0.1       www.test5.com
127.0.0.1       www.test6.com
127.0.0.1       www.test7.com
127.0.0.1       www.test8.com
127.0.0.1       www.test9.com



编辑E:\xampp\apache\conf\httpd.conf


<Directory "E:\xampp\htdocs2">

    Options Indexes FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
Require all granted
#最后一句必须要有!
</Directory>



#Include conf/extra/httpd-vhosts.conf
#不可在Directory前出现


#不用httpd-vhosts.conf也可以了
<VirtualHost *:80>
    ServerAdmin webmaster@dummy-host.example.com
ServerName www.test1.com
    DocumentRoot "E:/xampp/htdocs2"


    ErrorLog "logs/www.test1.com-error.log"
    CustomLog "logs/www.test1.com-access.log" common
</VirtualHost>

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值