nginx转发http和tcp

http转发

upstream goforit_201
{
server 172.168.10.10:201;
} server {
listen 201;
server_name 192.168.0.100;
access_log logs/access_201.log main;
location / {
proxy_pass http://goforit_201;
allow 192.168.230.0/24;
deny all;
}
} tcp转发需要添加stream模块 --prefix=/usr/local/data/nginx —user=goforit —group=goforit --with-pcre --with-http_stub_status_module --with-http_ssl_module --with-stream --with-stream_ssl_module stream {
server {
listen 200;
proxy_pass goforit_200;
allow 192.168.230.0/24;
deny all;
}
upstream goforit_200
{
server 172.168.10.10:200;
}
}

  

nginx upstream的更多相关文章

  1. Nginx upstream 长连接

    原文: http://bollaxu.iteye.com/blog/900424 Nginx upstream目前只有短连接,通过HTTP/1.0向后端发起连接,并把请求的"Connecti ...

  2. nginx upstream的几种配备方式

     nginx upstream的几种配置方式 nginx 的upstream目前支持4种方式的分配 1.轮询(默认) 每个请求按时间顺序逐一分配到不同的后端服务器 ,如果后端服务器down掉,能自动剔 ...

  3. nginx upstream轮询配置

    nginx upstream nginx的upstream官方地址为:http://nginx.org/cn/docs/http/ngx_http_upstream_module.html 轮询分为多 ...

  4. Nginx+upstream针对后端服务器容错的运维笔记

    熟练掌握Nginx负载均衡的使用对运维人员来说是极其重要的!下面针对Nignx负载均衡upstream容错机制的使用做一梳理性说明: 一.nginx的upstream容错 1)nginx 判断节点失效 ...

  5. [转帖]nginx upstream模块--负载均衡

    nginx upstream模块--负载均衡 https://www.cnblogs.com/linjiqin/p/5494783.html Module ngx_http_upstream_modu ...

  6. Nginx Upstream timed out (110: Connection timed out)

    Nginx Upstream timed out (110: Connection timed out) – 运维生存时间 http://www.ttlsa.com/nginx/nginx-upstr ...

  7. Nginx Upstream Keepalive 分析 保持长连接

    Nginx Upstream长连接由upstream模式下的keepalive指令控制,并指定可用于长连接的连接数,配置样例如下: upstream http_backend {     server ...

  8. Nginx upstream的5种权重分配方式【转】

    原文地址:Nginx upstream的5种权重分配方式 1.轮询(默认) 每个请求按时间顺序逐一分配到不同的后端服务器,如果后端服务器down掉,能自动剔除. 2.weight指定轮询几率,weig ...

  9. 使用Nginx Upstream 部署 OpenERP

    Openerp 6.1 使用werkzeug 作为web服务的框架,性能比之前的cherrypy 有了很大的改善.但无论是 werkzeug 还是cherrypy ,都不是专门的web服务器.通常的做 ...

  10. Shell脚本修改Nginx upstream配置文件

    #!/bin/bash ##################################################### # Name: change_nginx_upstream_conf ...

随机推荐

  1. sklearn学习3----模型选择和评估(1)训练集和测试集的切分

    来自链接:https://blog.csdn.net/zahuopuboss/article/details/54948181 1.sklearn.model_selection.train_test ...

  2. 安装NexT主题

    Hexo 安装主题的方式非常简单,只需要将主题文件拷贝至站点目录的 themes 目录下, 然后修改下配置文件即可. 下载主题包 在终端窗口下,定位到 Hexo 站点目录下.使用 Git checko ...

  3. JS侧边栏实现

    <!DOCTYPE html> <html lang="en"> <style> </style> <head> < ...

  4. JS DOM 实例(5大常用实例)

    第1个实例:循环单击变色 <html lang="en"> <head> <meta charset="UTF-8"> &l ...

  5. List<T>与List<?>的区别

    T 代表某一类型 ? 代表任意类型.. T因为代表是某一确定类型..所以你可以使用它..比如你有个List<T>类型的变量tList 你可以用T t = tList.get(1);也可以用 ...

  6. 【Codeforces Round #499 (Div. 1) B】Rocket

    [链接] 我是链接,点我呀:) [题意] 让你猜到火星的距离x是多少. 已知1<=x<=m 然后你可以问系统最多60个问题 问题的形式以一个整数y表示 然后系统会回答你3种结果 -1 x& ...

  7. [Ubuntu]安装中文输入法

    安装了英文版的Ubuntu12.04之后.使用ctrt+space无法切换到中文,才反应过来. 于是查询了下怎么在Ubuntu下安装和配置中文输入法. 第一步安装语言包: 在左側的菜单条中点击 sys ...

  8. POJ 1286

    Burnside定理. 可以用Euler函数优化. #include <iostream> #include <cstdio> #include <cstring> ...

  9. 在IDEA中代码自动提示第一个字母大小写必须匹配的解决

    在IDEA中代码自动提示第一个字母大小写必须匹配的解决 学习了:http://blog.csdn.net/babys/article/details/41775715 setting>Edito ...

  10. 【Android】Android程序自己主动更新

    App自己主动更新的步骤可分为三步: 检查更新(假设有更新进行第2步,否则返回) 下载新版的APK安装包 安装APK 以下对这三步进行解释.当中会穿插相应代码.App自己主动更新的这三步所有被封装到了 ...