It appears I have a similar problem, but with different outcome.
I started installing modsecurity with owasp, but since I got a false positive just by updating a Worpress article, switched to comodo ruleset.
\var\log\CWAF\updater.log says this:
21/09/19 20:27:27 updater[29337] ERROR: can't restart nginx. nginx returns: nginx: [emerg] "modsecurity_rules_file" directive Rules error. File: /usr/local/cwaf/rules/00_Init_Initialization.conf. Line: 15. Column: 37. SecDefaultActions can only be placed once per phase and configuration context. Phase 2 was informed already. in /etc/nginx/nginx-modsecurity-enable.conf:2
...which is how I ended up in this thread. The suggested fixes don't work, however.
nginx -t
Code:
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
systemctl status nginx.service
Code:
* nginx.service - The nginx HTTP and reverse proxy server
Loaded: loaded (/etc/systemd/system/nginx.service; enabled; vendor preset: disabled)
Active: activating (start) since Sat 2019-09-21 17:03:36 EDT; 48s ago
Process: 16271 ExecStart=/usr/sbin/nginx -c /etc/nginx/nginx.conf (code=exited, status=0/SUCCESS)
Process: 16268 ExecStartPre=/usr/sbin/nginx -t -c /etc/nginx/nginx.conf (code=exited, status=0/SUCCESS)
Main PID: 20641 (code=exited, status=0/SUCCESS)
CGroup: /system.slice/nginx.service
|-16272 nginx: master process /usr/sbin/nginx -c /etc/nginx/nginx.conf
|-16273 nginx: worker process
|-16274 nginx: worker process
|-16275 nginx: worker process
`-16276 nginx: worker process
Sep 21 17:03:36 server systemd[1]: Starting The nginx HTTP and reverse proxy server...
Sep 21 17:03:37 server nginx[16268]: nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
Sep 21 17:03:37 server nginx[16268]: nginx: configuration file /etc/nginx/nginx.conf test is successful
Sep 21 17:03:37 server systemd[1]: Can't open PID file /var/run/nginx.pid (yet?) after start: Too many levels of symbolic links
Any help greatly appreciated!