Comment 3 for bug 1769430

Thomas Ward (teward) wrote :

Did you ever have the upstream nginx installations on your system, either compiled from source or otherwise? Because this looks like something specific to your system, and likely because the actual nginx upstream 'default' location is in use.

These lines in the systemctl status output specifically indicate a configuration level issue on your end:

May 06 15:31:17 gerald-HP-Notebook nginx[13067]: nginx: [emerg] open() "/usr/share/nginx/logs/" failed (2: No such file or directory)
May 06 15:31:17 gerald-HP-Notebook nginx[13067]: nginx: configuration file /etc/nginx/nginx.conf test failed

The default NGINX configuration for Ubuntu's NGINX packages defines the following in /etc/nginx/nginx.conf:

pid /run/;

Your system is trying to use /usr/share/nginx/logs/ This is the default for NGINX when you are using the upstream defaults. This is atypical and can cause problems.

If you ever had NGINX on this system before, that configuration was likely never erased (unless you use 'purge' when removing the packages). This is the most likely cause of the problem (but ultimately is not really a bug in the package itself).