|
|
发表于 2010-10-31 21:44:09
|
显示全部楼层
- server {
- listen 80;
- server_name www.xxxxxx.com _.xxxxxx.com;
- index index.php index.html index.htm;
- root /xxxxxxx;
- open_file_cache max=2000 inactive=2h;
- open_file_cache_valid 3h;
- open_file_cache_errors off;
- location / {
- #php backend source
- location ~ .*\.(php|php5)?$ {
- #反向通用配置
- proxy_redirect off;
- #proxy_set_header Host $host;
- proxy_set_header Host $proxy_host;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header REMOTE-HOST $remote_addr;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_set_header X_FORWARDED_HOST $host;
- proxy_pass http://$host:808;
- #include proxy upstream
- #include proxyupstream.conf;
- }
- location ~ .*\.(js|css|gif|jpg|jpeg|png|bmp|swf|flv)$ {
- #缓存容器
- proxy_cache cache_one;
- expires 30d;
- }
- }
- }
复制代码 |
评分
-
查看全部评分
|