修改nginx配置文件
$ sudo vim /opt/nginx/conf/nginx.conf
server {
listen 80;server_name 2207.com;
charset utf-8;
location / {
proxy_pass http://load_balance_2207;
client_max_body_size 10m;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
}
location /status {
access_log off;
}
}
upstream load_balance_2207 {
server 10.46:9090 weight=10 ;
}
生效
$ sudo /opt/nginx/sbin/nginx -s reload