nginx 配置备忘
来源:互联网 发布:鲨鱼网络 编辑:程序博客网 时间:2024/06/11 17:29
持续更新,个人使用
#user nobody;#进程数worker_processes 1;#错误日志配置error_log logs/error.log;#error_log logs/error.log notice;#error_log logs/error.log info;#pid logs/nginx.pid;#连接数配置events { worker_connections 1024;}http { include mime.types; default_type application/octet-stream; sendfile on; keepalive_timeout 65; gzip on; server { listen 80; server_name localhost; access_log logs/host.access.log main; location / { root html; index index.html index.htm; } error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } #负载均衡配置 location /proxy { proxy_pass http://backend } #上游服务器配置 upstream backend { #负载均衡算法配置: #round-robin(轮询,默认) #ip_hash(根据 IP 哈希) #hash key [consistent](根据指定的 key 哈希,可选一致性哈希) round-robin; #权重: weight server 10.20.30.1:8080 weight=1 #失败重试: fail_timeout 时间内失败了 max_fails 次数,将摘掉上游服务器,fail_timeout 过后再次加入到存活服务器列表进行尝试 server 10.20.30.2:8080 max_fails=2 fail_timeout=10s weight=2 } }}
阅读全文
0 0
- Nginx安装配置备忘
- nginx配置备忘
- nginx 配置备忘
- nginx配置学习备忘0
- nginx 0.8.38 安装配置备忘
- 【备忘】nginx 配置 某个路径代理
- nginx备忘
- nginx 0.8.38 Windows 下的安装配置备忘
- Debian环境 Python + Django + Nginx + uWSGI + MySQL 配置备忘
- 【nginx】把自己的nginx配置贴上来,做个备忘
- Nginx学习总结(5)——Nginx基本配置备忘
- nginx 配置文件备忘
- nginx 配置文件备忘-Terry
- django nginx 学习备忘
- nginx rewrite 学习备忘
- nginx日志切割备忘
- nginx 编译错误解决方法 [备忘]
- centos 6.5 nginx安装备忘
- 【笔记】《WebGL编程指南》学习-第5章颜色与纹理(3-使用多幅纹理))
- File IO(NIO.2):文件操作
- Reproducing and learning new algebraic operations on word embeddings using genetic programming
- hdu 2066 一个人的旅行
- exports 和 module.exports 的区别
- nginx 配置备忘
- nginx相关
- Java——反射
- ionic1.x 版本的透明状态栏的实现
- Intel SGX
- 报错The project was not built due to "A resource exists with a different case: '/xxx/bin/classes/com
- 【安全牛学习笔记】SSL、TLS中间人攻击
- JS不允许手动设置请求头的cookie
- 图形编程之 OpenGL ES 2.0 —— 从我们的世界到他们的世界 (5)