server {
    listen 80;
    listen [::]:80;
    listen 443 ssl;
    listen [::]:443 ssl;
    server_name crockfordfacts.org;

    access_log  /var/log/nginx/crockfordfacts.org.access.log;
    error_log   /var/log/nginx/crockfordfacts.org.error.log;

    root    /var/www/crockfordfacts.org;

    location / {
        proxy_pass        http://localhost:8001;
    }
}

server {
    listen 80;
    listen [::]:80;
    server_name crockfordfacts.org;

    return 301 https://$server_name$request_uri;
}

server {
    listen 443 ssl;
    listen [::]:443 ssl;
    server_name crockfordfacts.org;

    add_header Strict-Transport-Security "max-age=31536000";

    access_log  /var/log/nginx/crockfordfacts.org.access.log;
    error_log   /var/log/nginx/crockfordfacts.org.error.log;

    root    /var/www/crockfordfacts.org;

    location / {
        proxy_pass        http://localhost:8001;
    }
}

Use HTTPS Strict Transport Security
Use HTTPS Strict Transport Security
