I had the same issue Failed to start LSB: starts the nginx web server.
.
After checking, there were no logs available apart from this. Also error logs at /www/wwwlogs/nginx_error.log
was empty.
After changing error_log /www/wwwlogs/nginx_error.log crit;
to error_log /www/wwwlogs/nginx_error.log debug;
in /www/server/nginx/conf/nginx.conf
and starting nginx again, I was able to observe the following error:
root@hostname:/www/server/nginx# cat /www/wwwlogs/nginx_error.log
2024/11/28 02:17:08 [error] 29252#0: init_by_lua_file error: /www/server/free_waf/init.lua:7: module 'cjson' not found:
no field package.preload['cjson']
no file '/www/server/free_waf/cjson.lua'
no file './cjson.so'
no file '/usr/local/lib/lua/5.1/cjson.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback:
[C]: in function 'require'
/www/server/free_waf/init.lua:7: in main chunk
Then I remembered I had installed the Nginx Free WAF Official App. After uninstalling it, NGINX can now be restarted successfully.
Two suggestions for the aapanel team:
- Please lower the error log level so errors like this can be surfaced to the user
- Please fix Nginx Free WAF.
Thank you!!