nginx upstream
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的更多相关文章
- Nginx upstream 长连接
原文: http://bollaxu.iteye.com/blog/900424 Nginx upstream目前只有短连接,通过HTTP/1.0向后端发起连接,并把请求的"Connecti ...
- nginx upstream的几种配备方式
nginx upstream的几种配置方式 nginx 的upstream目前支持4种方式的分配 1.轮询(默认) 每个请求按时间顺序逐一分配到不同的后端服务器 ,如果后端服务器down掉,能自动剔 ...
- nginx upstream轮询配置
nginx upstream nginx的upstream官方地址为:http://nginx.org/cn/docs/http/ngx_http_upstream_module.html 轮询分为多 ...
- Nginx+upstream针对后端服务器容错的运维笔记
熟练掌握Nginx负载均衡的使用对运维人员来说是极其重要的!下面针对Nignx负载均衡upstream容错机制的使用做一梳理性说明: 一.nginx的upstream容错 1)nginx 判断节点失效 ...
- [转帖]nginx upstream模块--负载均衡
nginx upstream模块--负载均衡 https://www.cnblogs.com/linjiqin/p/5494783.html Module ngx_http_upstream_modu ...
- Nginx Upstream timed out (110: Connection timed out)
Nginx Upstream timed out (110: Connection timed out) – 运维生存时间 http://www.ttlsa.com/nginx/nginx-upstr ...
- Nginx Upstream Keepalive 分析 保持长连接
Nginx Upstream长连接由upstream模式下的keepalive指令控制,并指定可用于长连接的连接数,配置样例如下: upstream http_backend { server ...
- Nginx upstream的5种权重分配方式【转】
原文地址:Nginx upstream的5种权重分配方式 1.轮询(默认) 每个请求按时间顺序逐一分配到不同的后端服务器,如果后端服务器down掉,能自动剔除. 2.weight指定轮询几率,weig ...
- 使用Nginx Upstream 部署 OpenERP
Openerp 6.1 使用werkzeug 作为web服务的框架,性能比之前的cherrypy 有了很大的改善.但无论是 werkzeug 还是cherrypy ,都不是专门的web服务器.通常的做 ...
- Shell脚本修改Nginx upstream配置文件
#!/bin/bash ##################################################### # Name: change_nginx_upstream_conf ...
随机推荐
- 执行python manage.py makemigrations时报错TypeError: __init__() missing 1 required positional argument: 'on_delete'
在执行python manage.py makemigrations时报错: TypeError: __init__() missing 1 required positional argument: ...
- Vue学习之路第四篇:v-html指令
上一篇我们讲解了两种方式,把Vue对象的数据展示在页面上: 1.插值表达式 2.v-text指令 但是如果我们展示的数据包含元素标签或者样式,我们想展示标签或样式所定义的属性作用,该怎么进行渲染,比如 ...
- 浅谈optparse 解析命令行参数库
使用的背景 在工作中我们经常要制定运行脚本的一些参数,因为有些东西是随着我么需求要改变的,所以在为们写程序的时候就一定不能把写死,这样我们就要设置参数 在python中我们可以通过sys 模板的arg ...
- ansible shell模块
[root@ftp:/root] > ansible ansible01 -u root -k -m shell -a 'hostname' SSH password: ansible01 | ...
- springmvcjson中文乱码处理
在sping.xml中增加配置信息 <bean class="org.springframework.web.servlet.mvc.method.annotation.Request ...
- 【基于mini2440开发板的交叉编译环境及内核树配置.
在学习linux驱动开发过程中,交叉编译环境的配置及内核树的生成无疑是对linux不是十分了解的新人面前的一堵墙.高高大大的墙...笔者在初探这一方向时,就在这2个问题上苦恼了很久.查阅无数资料,大多 ...
- TI低功耗蓝牙(BLE)介绍
TI低功耗蓝牙(BLE)介绍 本文档翻译和修改自参考资料:CC2540Bluetooth Low Energy Software Developer’s Guide (Rev. B),部分图片直接引用 ...
- python_元组、字典
1.元组无法修改,只能索引2.只有两种方法 count 和 indexnames = ("Alex","jack")print(names.count(&quo ...
- pytorch 6 batch_train 批训练
import torch import torch.utils.data as Data torch.manual_seed(1) # reproducible # BATCH_SIZE = 5 BA ...
- 紫书 例题8-3 UVa 1152(中途相遇法)
这道题要逆向思维, 就是求出答案的一部分, 然后反过去去寻找答案存不存在. 其实很多其他题都用了这道题目的方法, 自己以前都没有发现, 这道题专门考这个方法.这个方法可以没有一直往下求, 可以省去很多 ...