site/nginx.conf
Ref: Size: 1.2 KiB History
server {
listen 8080;
server_name _;
# Redirects go out relative. nginx would otherwise build an absolute URL
# from its own scheme and listen port — behind the proxy that serves
# eitri.sh, a Location of http://eitri.sh:8080/... points nowhere.
absolute_redirect off;
root /usr/share/nginx/html;
index index.html;
# The moving alias: a stale cached manifest would mask releases from
# every fleet (servers re-poll it daily).
location ^~ /dl/latest/ {
autoindex on;
add_header Cache-Control "no-cache";
}
# Versioned artifacts are content-addressed by SHA256SUMS: immutable.
# NB: each location sets its own add_header — nginx location-level
# add_header REPLACES inherited ones, so add new headers everywhere.
location ~ ^/dl/v[0-9] {
autoindex on;
add_header Cache-Control "public, max-age=31536000, immutable";
}
# /docs/ssh-access/ became /docs/connecting/ when the docs were split by
# task. The old path is linked from the console, from release notes, and
# from anywhere anyone pasted it.
location ~ ^/docs/ssh-access/?$ {
return 301 /docs/connecting/;
}
location / {
add_header Cache-Control "no-cache";
}
}