Getting 502 Bad Gateway after disable the web

Json Anderson6 years ago

Hi,

I disabled web interface and I'm getting 502 Bad Gateway. How can I properly disable web interface and enabled API and Web Socket using NGINX.

Bellow is the nginx configuration.

location / {
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-Host $host;
        proxy_set_header X-Forwarded-Server $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";

        proxy_redirect http://127.0.0.1:8082/api /api;
        proxy_redirect ws://127.0.0.1:8082/api/socket /api/socket;
        proxy_pass http://127.0.0.1:8082;
        proxy_read_timeout 86400s;
        proxy_send_timeout 86400s;
        allow all; # Any IP can perform any other requests

    }

Thank you.