多IP访问多网站

root@server \~# mount /dev/sr0 /mnt #挂载

root@server \~# dnf install nginx -y #安装

root@server nginx# systemctl stop firewalld #关闭防火墙

root@server nginx# systemctl restart nginx #重启

root@server nginx# setenforce 0 #关闭selinux

root@server nginx# nmtui #写多IP

root@server nginx# nmcli connection up ens160 #重启nmtui

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 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 #重启

验证结果

相关推荐
Android系统攻城狮16 分钟前
Linux Gstreamer深度解析之gst_audio_decoder_set_estimate_rate调用流程与实战(四十五)
linux·gstreamer音视频·音视频进阶
Web极客码19 分钟前
抹平首包开销:我用 Claude 调优 Nginx 的 Brotli 与 Gzip 动态压缩,平衡 CPU 与网络吞吐
服务器·agent 工作流·agent 图
FED_AF23 分钟前
Linux运维“邪修”功法之通配符
linux·运维
箓维26 分钟前
线程的概念和理解
linux
云杂项1 小时前
tmux指南:安装、配置与高效使用(Ubuntu上)
linux·服务器·ubuntu
YOLO数据集集合1 小时前
风机叶片表面损伤检测数据集 | 风机叶片 表面损伤 污渍检测 无人机巡检 风电运维9119期
运维·人工智能·计算机视觉·目标跟踪·无人机·智慧城市·电力巡检
j7~1 小时前
【Linux网络编程】四十七.《Linux IO 模型详解:阻塞 IO、非阻塞 IO 与 IO 多路转接(select)》
linux·运维·网络·select·非阻塞io·阻塞io·i/o多路连接
分布式存储与RustFS2 小时前
用RustFS给Harbor当S3存储后端
运维·云原生·开源·对象存储·分布式存储·s3·性能基准
GeW2 小时前
智能工厂背后:Linux在跑,数据库在扛,高端制造在加速
linux
泡海椒2 小时前
趋势分析报表:jquick-pdf折线图PDF生成实战
java·大数据·运维·服务器·前端·pdf