Enabled HTTPS and for nginx and then it shows 502 bad gateway
I have installed NGINX on my ubuntu 16.04 VPS for an external web program called Pterodactyl and when i went to access the site where i needed to go to their admin panel it showed
502 Bad Gateway nginx/1.12.1 (Ubuntu)
Steps i did:
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok nginx: configuration file /etc/nginx/nginx.conf test is successful
then i restarted the vps
after it booted i did service nginx status
root@HSH-VPS:~# service nginx status ● nginx.service - A high performance web server and a reverse proxy server Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: en Active: active (running) since Mon 2018-07-02 01:14:51 UTC; 21min ago Docs: man:nginx(8) Process: 1631 ExecStop=/sbin/start-stop-daemon --quiet --stop --retry QUIT/5 - Process: 1644 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code Process: 1632 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process Main PID: 1646 (nginx) Tasks: 3 (limit: 4915) Memory: 4.0M CPU: 61ms CGroup: /system.slice/nginx.service ├─1646 nginx: master process /usr/sbin/nginx -g daemon on; master_pro ├─1647 nginx: worker process └─1648 nginx: worker process Jul 02 01:14:51 HSH-VPS systemd: Starting A high performance web server and a Jul 02 01:14:51 HSH-VPS systemd: Started A high performance web server and a
then i restarted nginx and again with the 502 error
now when pterodactyl installs it creates and enables HTTPS for the ip address/the domain you assigned so i thought maybe if i add a firewall and allow port 443 and allowed https but that didn’t solve it any ideas?
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.