upstream procs {
        server [::1]:5001;
}

server {
        listen 80;
        listen [::]:80;

        server_name recapturedocs.com www.recapturedocs.com;

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

server {
        listen 443;
        listen [::]:443;

        ssl on;
        ssl_certificate /etc/letsencrypt/live/jaraco.com/fullchain.pem;
        ssl_certificate_key /etc/letsencrypt/live/jaraco.com/privkey.pem;

        server_name recapturedocs.com www.recapturedocs.com;

        location / {
                proxy_pass http://procs;
                proxy_redirect off;
                proxy_set_header Host $host;
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header X-Forwarded-Host $server_name;
        }
}
