一.首先安装nginx
c
[root@server nginx]# systemctl stop firewalld 关防火墙
[root@server nginx]# setenforce 0 关selinux
[root@server nginx]# mount /dev/sr0 /mnt 挂载点
[root@server nginx]# dnf install nginx -y 安装nginx
二,添加地址
c
[root@server nginx]# setenforce 0 #关闭selinux
[root@server nginx]# nmtui #写多IP

切换手动模式

将ip改为192.168.146.129和192.168.146.130
c
[root@server nginx]# nmcli connection up ens160 #重启nmtui
[root@server nginx]# ip a 检验
编辑html
c
[root@server nginx]#vim /etc/nginx/conf.d/test_ip.conf #编辑
[root@server nginx]# mkdir /test/{100,129,200} -pv #创建文件
[root@server nginx]# echo this is 130 > /test/129/index.html
[root@server nginx]# echo this is 139 > /test/100/index.html
[root@server nginx]# echo this is 140 > /test/200/index.html #根据配置在主机创建数据文件
[root@server nginx]# systemctl restart nginx #重启
