搭建WEB项目04

vim vhost.conf
listen 9090
listen 9091
listen 9092
<directory /www>
allowoverride none
require all granted
</directory>
<virtualhost 192.168.238.135:80>
documentroot /www
servername 192.168.238.135
</virtualhost>

<virtualhost 192.168.238.138:80>
documentroot /www/138
servername 192.168.238.138
</virtualhost>

<virtualhost 192.168.238.139:80>
documentroot /www/139
servername 192.168.238.139
</virtualhost>

<virtualhost 192.168.238.135:9090>
documentroot /www/9090
servername 192.168.238.135
</virtualhost>

<virtualhost 192.168.238.135:9091>
documentroot /www/9091
servername 192.168.238.135
</virtualhost>

<virtualhost 192.168.238.135:9092>
documentroot /www/9092
servername 192.168.238.135
</virtualhost>
 mkdir /www/909{1,2}
mkdir /www/9090
tree /www

 echo welcome to 9090 > /www/9090/index.html
 echo welcome to 9091 > /www/9091/index.html
 echo welcome to 9092 > /www/9092/index.html
 netstat -lntup | grep httpd
 systemctl restart httpd

 

  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值