nginx反向代理
官网:
http://nginx.org/en/docs/beginners_guide.html#conf_structure
配置:
http://blog.csdn.net/physicsdandan/article/details/45667357
upstream billingweb { server 10.5.236.44:8880 weight=10; #server 127.0.0.2:222 weight=6; #server 127.0.0.2:333 weight=7; } server{ listen 8880; # using billingweb sub domain to access server_name billingweb.company.com; access_log /var/log/nginx/billingweb_access.log; location / { #root /home/billingweb_root; proxy_pass http://billingweb; proxy_read_timeout 300; proxy_connect_timeout 300; proxy_redirect off; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; } }
常用命令:
nginx -s start/stop/reload