server { listen 80; server_name xxx.com; root /usr/share/tomcat/webapps/xxx; error_log logs/wechat-jsp.err.log; location / { proxy_redirect off; proxy_pass http://127.0.0.1:8080/xxx/; } location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|flv|mp3|wma)$ { expires 30d; } location ~ .*\.(js|css)$ { expires 12h; } }