Commit 3632a6e4 authored by Ludovic Courtès's avatar Ludovic Courtès

nginx: Gracefully handle hpcweb downtime.

* nginx-locations.conf (@gnupackages): New location. (/browse, /package): Use @gnupackages as a fallback.
parent ee4c8090
......@@ -3,8 +3,21 @@ location / {
}
# For the package browsing interface.
location /browse { proxy_pass http://localhost:5000; }
location /package { proxy_pass http://localhost:5000; }
location @gnupackages {
return 307 https://www.gnu.org/software/guix/packages/;
}
location /browse {
proxy_pass http://localhost:5000;
proxy_connect_timeout 3s;
proxy_read_timeout 2s;
error_page 500 502 503 504 = @gnupackages;
}
location /package {
proxy_pass http://localhost:5000;
proxy_connect_timeout 3s;
proxy_read_timeout 2s;
error_page 500 502 503 504 = @gnupackages;
}
# For use by Certbot.
location /.well-known {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment