静态文件
server
{
server_name ********;
index index.html index.htm;
root /data/wwwroot/static/;
error_log /data/wwwlogs/static_error_log.log;
#location / {
location ~* \.(jpg|jpeg|gif|png|swf|htm|html)$ {
if (-f $request_filename) {
root /data/wwwroot/static/;
expires 30d;
break;
}
}
location ~* \.(js|css)$ {
if (-f $request_filename) {
root /data/wwwroot/static/;
expires 1d;
break;
}
}
#}
}
代理配置
server{
listen 80;
server_name **********;
error_log /data/wwwlogs/lms_error_log.log;
root /data/path;
location ^~/account_api/ {
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass
}
}
阅读(1541) | 评论(0) | 转发(0) |