diff --git a/nginx.conf b/nginx.conf index d2b2509..cb2c195 100644 --- a/nginx.conf +++ b/nginx.conf @@ -74,31 +74,31 @@ http { location / { proxy_set_header Connection ""; proxy_set_header Accept-Encoding ""; - proxy_cache_valid any 5m; + proxy_cache_valid 200 301 10m; proxy_cache_valid 404 1m; proxy_set_header Host pypi.org; proxy_ssl_name pypi.org; - proxy_pass https://sg_pypi; + proxy_pass 'https://sg_pypi'; proxy_redirect 'https://pypi.org' $scheme://$host; } location ^~ /simple { proxy_set_header Connection ""; proxy_set_header Accept-Encoding ""; - proxy_cache_valid any 5m; + proxy_cache_valid 200 301 10m; proxy_cache_valid 404 1m; proxy_set_header Host pypi.org; proxy_ssl_name pypi.org; - proxy_pass https://sg_pypi; + proxy_pass 'https://sg_pypi'; proxy_redirect 'https://pypi.org' $scheme://$host; } location ^~ /packages { proxy_set_header Connection ""; proxy_set_header Accept-Encoding ""; - proxy_cache_valid any 1M; + proxy_cache_valid 200 301 1M; proxy_cache_valid 404 1m; proxy_set_header Host files.pythonhosted.org; @@ -106,5 +106,9 @@ http { proxy_pass 'https://sg_pythonhosted/packages'; proxy_redirect 'https://files.pythonhosted.org/packages' $scheme://$host/packages; } + + location /nginx_status { + stub_status; + } } }