server {
    listen 80;
    return 301 https://$host$request_uri;
}

server {
    listen 443 ssl;
    ssl_certificate        /certificate/nginx.pem;
    ssl_certificate_key    /certificate/nginx.key;

    # if you are using cloudflare, you can use this enable authenticated origin pull. Dont forget to activate it in cloudflare
    #ssl_client_certificate /certificate/cloudflare_authenticated_origin_pull_ca.pem;
    #ssl_verify_client on;

    location /static/ {
        alias /static/;
    }

    location / {
        proxy_pass http://routerfleet:8001;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }
}