What happened to my permissions and how do I fix them? NGINX 502 error.
I set up my site a while ago so I kind of forget what I did. But it used to run just fine, and now I can’t access it, I just get a 502. This server is Ubuntu 18, with nginx and node.
First problem was that the server reset and cleared out my pm2 service which started the server. I started it again, but still get a 502. I can see that the server starts and doesn’t crash in the pm2 logs.
Then I tried to restart nginx, and got this:
myusername@myusername:~/web$ service nginx start ==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units === Authentication is required to start 'nginx.service'. Authenticating as: myusername Password: polkit-agent-helper-1: pam_authenticate failed: Authentication failure ==== AUTHENTICATION FAILED === Failed to start nginx.service: Access denied See system logs and 'systemctl status nginx.service' for details.
I don’t remember setting up this password and don’t have it written down. Though I then did sudo service nginx start and it didn’t seem to have a problem. Though it still has a 502.
I also tested the nginx config (though it was working before and I haven’t changed anything)
samkeddy@samkeddy:~/web$ sudo nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
Any other ideas to get my site back online?