Nginx:设置为HTTP代理服务器上网,使用upstream
来源:互联网 发布:烈火封神光翼升级数据 编辑:程序博客网 时间:2024/06/05 08:17
一、配置文件
Nginx作为代理,将请求交给Cache处理,如果Cache没有缓存,就回源。
通过upstream,可以实现多个Cache缓存之间的负载均衡。
worker_processes 1;events { worker_connections 1024;}http { log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; access_log logs/access.log main; upstream my_cache { server 192.168.175.130:80; } server { listen 80; server_name www.guowenyan.cn; location / { proxy_set_header Host "www.guowenyan.cn"; proxy_pass http://my_cache; } }}
参考资料:
Nginx:设置HTTP代理服务器上网:http://blog.csdn.net/guowenyan001/article/details/22718179
Nginx官网upstream配置实例:https://www.nginx.com/resources/wiki/start/topics/examples/loadbalanceexample/
0 0
- Nginx:设置为HTTP代理服务器上网,使用upstream
- Nginx:设置为HTTP代理服务器上网
- 为 TortoiseGit 和 TortoiseSVN 设置上网代理服务器
- 使用nginx搭建http代理服务器
- 使用Nginx搭建Http代理服务器
- 使用nginx搭建http代理服务器
- 使用nginx搭建http代理服务器
- 使用nginx搭建http代理服务器
- Nginx Upstream设置
- nginx:代理服务器(涉及upstream)的例子
- 宽带上网-----代理服务器设置
- nginx upstream 配置使用
- 用nginx做代理服务器上网
- 用nginx做代理服务器上网
- 如何使用代理服务器上网
- 如何使用代理服务器上网
- 使用ccproxy代理服务器上网
- linux使用代理服务器上网
- 利用.htaccess, 启用Apache的简单密码验证
- 企业内部软件开发的特点和模式
- Spring+SpringMVC+Mybatis 多数据源整合
- vnc登陆口令猜解研究
- android中xml tools属性详解
- Nginx:设置为HTTP代理服务器上网,使用upstream
- ctrl键对图形进行变换
- shiro管理端权限
- xhprof进行线上PHP性能追踪及分析
- Java I/O
- 知乎上对dp的讨论
- android渲染优化
- 【JEECG技术博文】JEECG简单实例讲解自定义表单功能
- hdu 1009 FatMouse' Trade【贪心】