worker_processes 4; events{ worker_connections 1024; } http{ server { listen 80; server_name myserver; location / { proxy_pass http://mysite; } } upstream mysite { server 11.101.64.103:80; server 11.101.64.103:8089; } }
这样就跟默认配置文件撇开关系了。
然后命令行:/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx_fzjh.conf
就可以启动了,重启前记得先关闭,命令:pkill -9 nginx