server {
    listen 80;
    listen [::]:80;
    server_name ttm.sh;
    return 307 https://$server_name$request_uri;
}

server {
    listen 443 ssl;
    listen [::]:443 ssl;
    server_name ttm.sh;

    # include your certs 
    ssl_certificate /etc/letsencrypt/live/ttm.sh/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/ttm.sh/privkey.pem;
    include /etc/letsencrypt/options-ssl-nginx.conf;
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;

    root /home/services/0x0;

    location / {
        include uwsgi_params;
        uwsgi_param UWSGI_SCHEME $scheme;

        # make sure this matches the port you're running uwsgi on
        uwsgi_pass 127.0.0.1:3031;
    }

    location /up {
        internal;
    }
}

