1、负载均衡,/usr/local/nginx/nginx.conf添加stream即可
http{ .... }
stream { server { listen 8080 reuseport; proxy_pass netty; } upstream netty { server 192.168.180.68:8080; server 192.168.180.69:8080; } }
2、添加文件服务器,在http中
server { listen 80; server_name 192.168.180.67;
location / { root /opt/test; index index.php index.html index.htm; autoindex on; autoindex_exact_size off; autoindex_localtime on; } }
本文出自 “lly0205.mofile.com” 博客,请务必保留此出处http://481814.blog.51cto.com/471814/1729525
原文:http://481814.blog.51cto.com/471814/1729525