标签:RoCE nec proc 重启 conf 代理 netstat ddr 反向
一、 编写nginx反向代理配置
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
upstream myserver {
server 10.0.0.7:80;
server 10.0.0.8:80;
server 10.0.0.9:80;
}
server {
listen 10.0.0.3:80;
server_name www.example.com;
root html;
index index.html index.htm;
location / {
proxy_pass http://myserver;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
}
}
}
二、 监听本地网卡上没有的IP地址
echo ‘net.ipv4.ip_nonlocal_bind = 1‘ >>/etc/sysctl.conf
此操作我的模板机已进行优化,但不保证其他机器也会优化,所以写上
sysctl -p
三、 重启服务
[root@xxx~]# nginx -s stop [root@xxx~]# nginx [root@xxx~]# netstat -lntup|grep nginx tcp 0 0 10.0.0.3:80 0.0.0.0:* LISTEN 53334/nginx
标签:RoCE nec proc 重启 conf 代理 netstat ddr 反向
原文地址:https://www.cnblogs.com/Wang-Hongwei/p/13183625.html