Lighttpd not running on FreeBSD with no errors shown

The data center on which my servers are hosted had a sudden electrical failure which let to a downtime of around 5 hours for my servers (I know it sucks, but then it happens).  The machine was later rebooted manually by the technician, and it went into a background fsck mode as it happens in BSD’s.

Now for some unknown reason, the lighttpd server would not start. It would not give any errors. I checked both the lighttpd logs and the syslog files for any erros being thrown, but the server would simply not give out any errors, but still would not run. I tried updating the ports, manually de-installing and reinstalling the lighttpd port, but I would still be getting the same results.

Then it hit upon me to reset the permissions of my webroot folders. I simply ran a recursive chown command ( chown -R www:www /path/to/webroot/directory ) .  This solved the problem immediately. Now I know this is a very simple problem, I was amazed by a simple fact that it would throw any errors and simply exit. It wasted my 5 hours, so I hope this can be of help to somebody.

Advertisement