您可以使用regexp 添加 位置 :
server { listen 80; server_name localhost; location ~* .(js|jpg|png|css)$ { root path/to/tomcat/document/root/Test/; expires 30d; } location / { proxy_pass http://127.0.0.1:8081/Test/; }}
您可以使用regexp 添加 位置 :
server { listen 80; server_name localhost; location ~* .(js|jpg|png|css)$ { root path/to/tomcat/document/root/Test/; expires 30d; } location / { proxy_pass http://127.0.0.1:8081/Test/; }}