Chinaunix首页 | 论坛 | 博客

rgy

  • 博客访问: 411092
  • 博文数量: 179
  • 博客积分: 2580
  • 博客等级: 少校
  • 技术积分: 1890
  • 用 户 组: 普通用户
  • 注册时间: 2009-04-19 08:45
文章分类

全部博文(179)

文章存档

2012年(7)

2011年(43)

2010年(60)

2009年(69)

我的朋友

分类: LINUX

2012-04-19 22:27:53

#
     server {
     listen          80;
     server_name     demo.com;
     index            index.php index.html;
     root            /opt/b2c/web/com/
     access_log      /opt/b2c/logs/nginx/
     error_log       /opt/b2c/logs/nginx/
     location ~* .(jpg|gif|png|js|css)$ {
            if (-f $request_filename) {
                expires 24h;
                break;
            }
        }
     location /status {
        stub_status on;
                   }
location / {
     try_files $uri $uri/ /index.php?q=$uri&$args;
                }
          location ~ \.php$  {
           proxy_redirect off;
           proxy_set_header Host  $host;
           proxy_set_header X-Forwarded-For  $remote_addr;
           proxy_set_header X-Real-IP $remote_addr;
           proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
          # proxy_hide_header Content-Type;
           proxy_buffer_size 500k;
           proxy_buffers     5  500k;
           proxy_pass ;

                          }
                }

 


 

阅读(1017) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~