多IP访问多网站

root@server \~\]# mount /dev/sr0 /mnt #挂载 \[root@server \~\]# dnf install nginx -y #安装 ![](https://i-blog.csdnimg.cn/direct/b9f6963745f149168baf6ba6a6f776ea.png) \[root@server nginx\]# systemctl stop firewalld #关闭防火墙 \[root@server nginx\]# systemctl restart nginx #重启 \[root@server nginx\]# setenforce 0 #关闭selinux \[root@server nginx\]# nmtui #写多IP ![](https://i-blog.csdnimg.cn/direct/b36cef15650d41e7ad837d9d82501a27.png) \[root@server nginx\]# nmcli connection up ens160 #重启nmtui ![](https://i-blog.csdnimg.cn/direct/cab044b17c9a47e2a18f1f7e222c0053.png) \[root@server nginx\]#vim /etc/nginx/conf.d/test_ip.conf #编辑 ![](https://i-blog.csdnimg.cn/direct/5861f282058b4ff081c8d5cee004f485.png) \[root@server nginx\]# mkdir /test/{100,129,200} -pv #创建文件 ![](https://i-blog.csdnimg.cn/direct/e86ca72222bf4b8fb9286e7357eb71d4.png) \[root@server nginx\]# echo this is 129 \> /test/129/index.html \[root@server nginx\]# echo this is 100 \> /test/100/index.html \[root@server nginx\]# echo this is 200 \> /test/200/index.html #根据配置在主机创建数据文件 \[root@server nginx\]# systemctl restart nginx #重启 验证结果 ![](https://i-blog.csdnimg.cn/direct/7e475e7c759a4d31b2280010e9875763.png)![](https://i-blog.csdnimg.cn/direct/eab1742c9e4e4cd68a1a715c13c53cc9.png)![](https://i-blog.csdnimg.cn/direct/3100257d698e440bba36fc2eb66287c7.png) ![](https://i-blog.csdnimg.cn/direct/1cb31ad6fbf048e085555e97a11f2e77.png)

相关推荐
G_H_S_3_39 分钟前
【网络运维】Docker 存储:镜像层与数据卷的管理应用
linux·运维·网络·docker
还鮟3 小时前
靶机远程控制实验命令与入门实践(Linux)
linux·网络·安全
TG:@yunlaoda360 云老大3 小时前
华为云国际站代理商备份策略设置过程中遇到问题如何解决?
服务器·数据库·华为云
手揽回忆怎么睡4 小时前
Alibaba Linux 8安装jdk25
linux·运维·服务器
❀͜͡傀儡师4 小时前
docker一键部署网页版Win11系统
运维·docker·容器
2301_800050994 小时前
华为云介绍
运维·华为云
爱潜水的小L4 小时前
自学嵌入式day39,抓包
linux
萌萌哒草头将军5 小时前
AudioDock:服务器和 NAS 音频播放最棒的软件!🚀🚀🚀
服务器·docker·node.js
lifewange5 小时前
测试场景 Linux 命令速查表
linux·运维·服务器
Vect__5 小时前
进程控制详解
linux·驱动开发