I got a problem which I have been trying to fix for a few days now and I don\'t know what to do, have been looking for answers but all of those I found didn\'t help me.
For my case, I need to run
sudo nginx -t
It will check if Nginx configuration is correct or not, if not, it will show you which configuration causes the error.
Then you need to go to /etc/nginx/sites-available
to fix the broken configuration.
After that, you can restart Nginx without any problem.
sudo systemctl restart nginx