【nginx】负载配置
发布时间:2017-03-11 00:00:42
contos搭建nginx服务:http://www.cnblogs.com/wangzhongqiu/p/6527346.html转自:http://ajita.iteye.com/blog/1715269 Nginx ("engine x") 是一个高 ...
contos搭建nginx服务:http://www.cnblogs.com/wangzhongqiu/p/6527346.html
转自:http://ajita.iteye.com/blog/1715269
Nginx ("engine x") 是一个高性能的 HTTP 和 反向代理 服务器,也是一个 IMAP/POP3/SMTP 代理服务器。
- #user nobody;
- worker_processes 2;
-
- #error_log logs/error.log;
- #error_log logs/error.log notice;
- #error_log logs/error.log info;
-
- #pid logs/nginx.pid;
-
-
- events {
- #使用网络IO模型linux建议epoll,FreeBSD建议采用kqueue,window下不指定。
- #use epoll;
- worker_connections 1024;
- }
-
-
- http {
- include mime.types;
- default_type application/octet-stream;
-
- sendfile on;
-
- keepalive_timeout 65;
-
- #gzip on;
- upstream mysvr {
- #根据ip计算将请求分配各那个后端tomcat,许多人误认为可以解决session问题,其实并不能。
- #同一机器在多网情况下,路由切换,ip可能不同
- #ip_hash;
- server localhost:18080;
- server localhost:28080;
- }
-
- server {
- listen 8080;
- server_name localhost;
-
- #charset koi8-r;
-
- #access_log logs/host.access.log main;
-
- location / {
- proxy_connect_timeout 3;
- proxy_send_timeout 30;
- proxy_read_timeout 30;
- proxy_pass http://mysvr;
- }
- }
- }
原标题:【nginx】负载配置
关键词:nginx
*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们:
admin#shaoqun.com
(#换成@)。
深圳 酒吧 推荐:https://www.vstour.cn/t/深圳 酒吧 推荐.html
深圳 酒店式公寓:https://www.vstour.cn/t/深圳 酒店式公寓.html
深圳 君悦酒店 体量:https://www.vstour.cn/t/深圳 君悦酒店 体量.html
深圳 开封:https://www.vstour.cn/t/深圳 开封.html
深圳 看欧洲杯:https://www.vstour.cn/t/深圳 看欧洲杯.html
深圳 口岸旅行社:https://www.vstour.cn/t/深圳 口岸旅行社.html
深圳大运中心附近商圈有哪些:https://www.vstour.cn/a/336167.html
深圳大运中心附近吃饭的地方推荐:https://www.vstour.cn/a/336168.html