Today I discussed and analysed with the Moderators of openmediavault to find out what was going wrong.
In the posts above you will find that the issue was probably started with an incorrect version of nginx, 1.6 instead of 1.2.
Also we find out that the /usr/sbin/nginx didn't exist anymore. This one was getting solved by installing nginx light:
apt-get install nginx-light
The next step was to try to start nginx. This went wrong with the error message that some other service was already bind to port 80. We couldn't find no other running service which listens on port 80. So that issue was something within nginx itself.
With the omv-firstaid we tried to change the port of OpenMediaVault to 2000. After that change, Nginx was be able to start and the webinterface was back alive.
So we found a workaround to be able to start nginx which resulted in a working OpenMediaVault. Next step was to analyse why this issue happened if OpenMediaVault is running on port 80 within nginx.
subzero79 suggested me to remove the content of /etc/nginx/ and reinstall nginx with some specific parameters to recreate this content:
apt-get -o DPkg::options::=--force-confmiss --reinstall install nginx-common
For safe I renamed the /etc/nginx folder to /etc/nginx.old. This was needed afterwards, so please don't skip this step.
A new nginx folder was created by apt-get and I had to reconfigure OpenMediaVault. Before I was be able to recreate the config, I needed to copy the /etc/nginx.old/openmediavault-webgui.d to /etc/nginx/openmediavault-webgui.d. Then reconfigure nginx with:
Before we changed the port to 2000, so change it back with omv-firstaid and reconfigure the port to HTTP 80.
This went fine, nginx started succesfully and the OpenMediaVault webpage also worked.
Because we had a copy of the nginx folder, I did a compare of them. The nginx.old one contained a file in the conf.d directory named default.conf.
This file had a entry to let the server listen on port 80.
The /etc/nginx/nginx.conf contains:
So it first scans the default.conf file, and after that the folders within sites-enabled. Because they both would listen on port 80, I was unable to start it.
I hope all of you get some information with this post and will be able to solve the issue by yourself if nginx went wrong.
Also I would like to thank the OpenMediaVault team, and especially @subzero79, for the great help to solve this issue.
“English isn’t my first language, so please excuse any mistakes.”