如何在nginx的proxy_pass位置设置资产caching
我有一个片段,我使用的是我的所有网站,在静态网站上运行良好,但是在proxy_pass网站上没有那么多。 我不知道我做错了什么,我怎样才能安全地包含我的代码段而不使资产404? 这是我的服务器块 server { server_name jenkins.fabrikam.com; include /etc/nginx/location.conf; # All assets are 404 with this location / { proxy_pass http://localhost:8080; include /etc/nginx/proxy_params; } } 这里是location.conf # cache.appcache, your document html and data location ~* \.(?:manifest|appcache|html?|xml|json)$ { expires -1; } # Feed location ~* \.(?:rss|atom)$ { expires 1h; add_header Cache-Control "public"; } # Media: images, […]