Open for work
code/ nulled-room /nulledroom.nginx.conf
36 lines · 1 KB · ini Raw
123456789101112131415161718192021222324252627282930313233343536
server {
    listen 80;
    server_name nulledroom.com www.nulledroom.com;
    return 301 https://$host$request_uri;
}

server {
    listen 443 ssl;
    server_name nulledroom.com www.nulledroom.com;

    # SSL - Certbot will have filled these in already
    ssl_certificate /etc/letsencrypt/live/nulledroom.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/nulledroom.com/privkey.pem;
    include /etc/letsencrypt/options-ssl-nginx.conf;
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;

    # Serve the frontend index.html
    location / {
        root /var/www/nulledroom;
        index index.html;
        try_files $uri $uri/ /index.html;
    }

    # WebSocket proxy
    location /ws {
        proxy_pass http://localhost:3000;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_read_timeout 3600s;
        proxy_send_timeout 3600s;
    }
}