server {
    listen 80;
    server_name studio-staging.rebreak.org;
    return 301 https://studio-staging.rebreak.org$request_uri;
}

server {
    listen 443 ssl;
    server_name studio-staging.rebreak.org;

    ssl_certificate     /etc/letsencrypt/live/studio-staging.rebreak.org/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/studio-staging.rebreak.org/privkey.pem;

    location / {
        proxy_pass http://127.0.0.1:54332;
        proxy_http_version 1.1;
        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-Proto $scheme;
    }
}
