proxy_pass ;
proxy_set_header Host $host;
proxy_set_header X-Forward-For $remote_addr;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|js|css)$
{
proxy_cache cache_one;
proxy_cache_valid 200 10m;
proxy_cache_valid 304 1m;
proxy_cache_valid 301 302 ih;
proxy_cache_valid any 1m;
proxy_cache_key $host$uri$is_args$args;
proxy_set_header Host $host;
proxy_set_header X-Forward-For $remote_addr;
proxy_pass ;
}
location ~ ^/admincp.php
{
proxy_set_header Host $host;
proxy_set_header X-Forward-For $remote_addr;
proxy_pass ;
}
access_log /data1/logs/hu.xoyo.com_accsee.log;
}
}
更多Nginx相关教程见以下内容:
搭建基于Linux6.3+Nginx1.2+PHP5+MySQL5.5的Web服务器全过程
CentOS 6.3下配置Nginx加载ngx_pagespeed模块