contrib/nginx.conf
server {
listen 443 ssl http2 deferred;
ssl_certificate /etc/letsencrypt/live/scoreboard.crawl.develz.org/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/scoreboard.crawl.develz.org/privkey.pem;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 24h;
ssl_stapling on;
ssl_stapling_verify on;
ssl_trusted_certificate /etc/letsencrypt/live/scoreboard.crawl.develz.org/fullchain.pem;
resolver 8.8.4.4 8.8.8.8 valid=300s;
resolver_timeout 5s;
# 1 year HSTS
add_header Strict-Transport-Security "max-age=31536000" always;
root /app/scoreboard/website;
index index.html;
server_name scoreboard.crawl.develz.org scoreboard.crawl.project357.org;
error_page 404 /404.html;
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ =404;
}
location /api {
default_type application/json;
}
location ~* \.(css|js|png)$ {
expires 1h;
}
location ~* \.(html|json)$ {
expires 1m;
}
}