location /rest {
#proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://192.168.0.231:8081/rest;
proxy_set_header X-Forwarded-Proto https;
proxy_redirect http:// $scheme://;
if ($request_filename ~* .*.(html|htm)$)
{
expires -1s;
}
if ($request_filename ~* .*.(gif|jpg|jpeg|png|bmp|swf)$)
{
expires 30d;
}
if ($request_filename ~ .*.(js|css)$)
{
expires 12h;
}
}