Today, I installed mod_security for nginx. I added the following block to
server {
listen 80;
server_name mydomain.com;
modsecurity on;
modsecurity_rules_file /etc/nginx/modsec/main.conf;
location / {
proxy_pass http://10.0.1.54:8002;
}
After restarting Nginx, I got the following error:
nginx: [emerg] "try_files" directive Rule id: 254 is duplicated
in /etc/nginx/nginx.conf:62
nginx: configuration file /etc/nginx/nginx.conf test failed
What is going wrong? how to fix it? This guide installed is here: https://www.tecmint.com/install-modsecurity-nginx-debian-ubuntu/