当前位置: 首页 > news >正文

http作业

1.关闭防火墙

[root@localhost ~]# systemctl stop firewalld   #关闭防火墙
[root@localhost ~]# setenforce  0

2.下载nginx包

[root@localhost ~]# mount   /dev/sr0   /mnt #挂载目录
[root@localhost ~]# yum install nginx  -y  #下载nginx包

3.增加多条端口

[root@localhost ~]# nmcli connection modify ens160  ipv4.method manual ipv4.addresses 192.168.92.10/24  ipv4.gateway 192.168.88.2 ipv4.dns 192.168.88.2  +ipv4.addresses 192.168.88.20/24  +ipv4.addresses 192.168.88.30/24  #当前主机添加多地址

4.期货网卡

[root@localhost ~]# nmcli connection up ens160 #激活网卡

5.自定义nginx配置文件

[root@localhost ~]# vim  /etc/nginx/conf.d/test_ip.conf  #自定义nginx配置文件
server {listen 192.168.88.10:80;root /test/10;location / {index  index.html;}
}
server {listen 192.168.88.20:80;root /test/20;location / { index  index.html;}
}
server {listen 192.168.88.30:80;root /test/30;location / {index  index.html;}
}

6.

[root@localhost ~]# mkdir /test/{10,20,30} -pv
mkdir: created directory '/test'
mkdir: created directory '/test/10'
mkdir: created directory '/test/20'
mkdir: created directory '/test/30'
[root@localhost ~]# echo this is 250 > /test/10/index.html
[root@localhost ~]# echo this is 250 > /test/20/index.html
[root@localhost ~]# echo this is 250 > /test/30/index.html

7.测试


http://www.mrgr.cn/news/56421.html

相关文章:

  • RabbitMQ高级特性详解
  • impdp+remap_schema导入后登录报ORA-01017: Invalid Username/password
  • Flutter鸿蒙next 布局架构原理详解
  • Python 代码实现对《红楼梦》文本的词频统计和数据可视化
  • TWS充电盒:【电源管理芯片汇总】
  • 平面声波——一维Helmhotz波动方程
  • 10.22软考初级网络管理员工重点之因特网与网络互联技术
  • 红黑树(创建 插入 测试验证)
  • 深入了解Java
  • 力扣 困难 52.N皇后II
  • <a-table>行数据增加点击事件并获取点击行的数据+自定义button按事件
  • MySQL之CRUD(下)
  • 中间件之MQ-Kafka
  • sql数据库的命令行操作(修改表)
  • Leetcode—1242. 多线程网页爬虫【中等】Plus(多线程)
  • C语言初阶小练习4(不用临时变量交换数值)
  • dolphinscheduler创建工作流及工作流中DataX的使用(简单操作)
  • TikTok账号被限流怎么解决?
  • 【二】企业级JavaScript开发之代码编辑器
  • 什么是表单数据
  • 群晖通过 Docker 安装 Gitea
  • 两个线程交替打印数字
  • 鸿蒙开发:两个重磅更新,鸿蒙版微信要来了!
  • Java学习Day50:唤醒八戒(Excel相关)
  • 中间件之Seata
  • Python酷库之旅-第三方库Pandas(160)