Check what errors you have with: sudo nginx -t Source: https://webinoly.com/support/496/nginx-service-is-not-active-cannot-reload If you get this error: nginx 502 error: /var/ log/nginx/error.log” failed (2: No such file or directory), then create the directory that is in this documentation: https://www.ucartz.com/clients/knowledgebase/1062/nginx-502-error –orvarorlogornginxorerror.log-failed-2-No-such-file-or-directory.html#:~:text=Then%20it%20means%20that%20your,or%20you%20have%20deleted%20them.&text=In% 20case%20the%20directory%20and,as%20per%20your%20nginx%20user.