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. luogu p1003

    P1003 题意 经过多个矩形(1e3)覆盖后后某个坐标属于那个矩形(仅仅是一次询问) 大水题,直接的做法,从后向前处理矩形是否覆盖查询的点,若覆盖,则是该矩形编号 题解 int get_num(){ ...

  2. Python的流程控制

    条件判断 通过`if`,`elif`,`else`关键字来实现条件判断逻辑的实现,执行改结构中的其中一个,其结构如下: if condition1: pass elif condition2: pas ...

  3. debian 9 安装后的配置,debian 9 开发环境。

    注意:以下命令用sudo或者以root用户进行 一.Xterm(在安装KDE桌面情况下)的配置(可以黏贴,复制): 首先在根目录下编辑文件.Xresources(没有可以创建) root@debian ...

  4. Git 合并流程

    首先把自己的代码提交到自己的分支 再把master[主分支]的代码拉下来更新 解决冲突 推送至自己的分支 请求合并到master[主分支]

  5. 2019-03-14 Python爬虫问题 爬取网页的汉字打印出来乱码

    html = requests.get(YieldCurveUrl, headers=headers) html=html.content.decode('UTF-8') # print(html) ...

  6. Spring MVC中 提交表单报错400

    背景: 在写SpringMVC表单提交的代码的时,在最后点击提交的时候总是会出现400的错误 原因: 主要原因就是表单提交的数据和对应实体类的属性无法完全匹配 解决方案: 查看我们提交的数据是否完全和 ...

  7. ubuntu/wireshark --Lua: Error during loading: [string "/usr/share/wireshark/init.lua"]:45问题解决

    错误如下: 解决方案:修改init.lua 直接运行wireshark的话会报错: Lua: Error during loading:[string "/usr/share/wiresha ...

  8. tp框架 验证码的应用注意事项

    1如何点击更换二维码 二维码是img标签的src访问生成二维码的方法.绑定点击事件,ajax的get方式请求生成二维码的函数.在U函数后面加上任意不重复的参数 如  ?rand=’+math.rand ...

  9. Nginx 实现反向代理

    Nginx 实现反向代理 两个域名指向同一台 Nginx 服务器,用户访问不同的域名显示不同的网页内容 两个域名分别是 www.test1.com www.test2.com 1.准备工作 下载及安装 ...

  10. myeclipse导入工程 Some projects cannot be imported because they already exist in the workspace

    问题描述: 1 第一次从外部导入工程或者新建工程,成功: 2 删除该工程,但是没有选择delete project contents on disk 3 再次需要该工程,导入该工程时出现警告:Some ...