Recently, on one of our older servers, a Debian 6 installation, Nginx was upgraded to 1.8.0 from the dotdeb repos. The update went without any apparent errors, except one — easy to miss — message at the end:
/usr/sbin/service: line 123: exec: reload: not found
In fact, I had missed that and assumed all was fine but after a while the server went down and Nginx would not start again. At least, not after the usual
nginx -t && service nginx reload
To my surprise, all other web services like php5-fpm, mysql etc. reloaded just fine with
service ... reload
A reboot did not start nginx either and
service nginx start got a similar response:
/usr/sbin/service: line 123: exec: start: not found
/etc/init.d/nginx start Nginx started correctly so I had my server running again. But I was not closer to finding the cause nor a solution.
Searching the web specifically for nginx 1.8 and debian 6 related issues did not reveal anything of interest. Only one question mentioning the issue in the comments on https://www.dotdeb.org/2015/05/07/nginx-1-8-0/ but it got no response.
I did find a bug report related to an entirely different service which mentioned the same error. And the solution there was to remove that service’s .conf file from /etc/init … so I looked in /etc/init and yes: there was an nginx.conf file there. And yes again: simply deleting it solved the problem!