大数据作业1

一、下载nginx\n\nyum install nginx\n\n

二、配置\n\nvim /etc/nginx/nginx.conf\n\n

三、加载配置\n\nsystemctl start nginx\n\nps -aux |grep nginx\n\n

四、多IP手动设置\n\nnmtui\n\n\n\n

五、配置nginx\n\nvim /etc/nginx/conf.d/test_ip.conf\n\ncat /etc/nginx/conf.d/test_ip.conf\n\nserver{\n   listen 192.168.117.128:80;\n   root /www/ip/130;\n   location / {\n     index index.html;\n   }\n}\n \nserver{\n        listen 192.168.117.100:80;\n        root /www/ip/100;\n        location / {\n                index index.html;\n        }\n}\n \nserver{\n        listen 192.168.117.200:80;\n        root /www/ip/200;\n        location / {\n                index index.html;\n        }\n}\n\n

六、创建目录\n\nmkdir /www/ip/{128,100,200} -pv\n\necho this is 128 > /www/ip/128/index.html\necho this is 100 > /www/ip/100/index.html\necho this is 200 > /www/ip/200/index.html\n\n

七、重启\n\nsystemctl restart nginx\n\ncurl 192.168.117.128\n\nthis is 128\n \n\ncurl 192.168.117.200\n\nthis is 200\n\ncurl 192.168.117.100\n\nthis is 100\n\n服务器

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值