Chinaunix首页 | 论坛 | 博客
  • 博客访问: 236326
  • 博文数量: 49
  • 博客积分: 246
  • 博客等级: 二等列兵
  • 技术积分: 1034
  • 用 户 组: 普通用户
  • 注册时间: 2012-04-02 13:18
文章分类

全部博文(49)

分类: Python/Ruby

2013-01-10 16:38:23


1. Nginx upstream code

点击(此处)折叠或打开

  1. upstream tomcat_ttpod {
  2.     server 10.0.0.1:10080 max_fails=3 fail_timeout=30s;
  3.     server 10.0.0.2:10080 max_fails=3 fail_timeout=30s;
  4.     server 10.0.0.3:10080 backup;

  5. server {
  6.     listen 80;
  7.     server_name ttpod.com;
  8.     index index.htm index.html;

  9. location ~ .*\.(gif|jpg|jpeg|png|ico|js|css|txt|html|htm)$ {
  10.     proxy_cache staticcache;
  11.     proxy_cache_key $host$uri;
  12.     proxy_cache_valid 200 206 301 302 2w;
  13.     proxy_ignore_headers "Cache-Control" "Expires" "Set-Cookie";
  14.     proxy_pass http://tomcat_ttpod;
  15. }
  16. location / {
  17.     proxy_pass
  18. }

阅读(1777) | 评论(0) | 转发(0) |
0

上一篇:mysql 5.5 install

下一篇:Nginx if

给主人留下些什么吧!~~