Nginx: [emerg] "init_by_lua_file" directive is duplicate in /etc/nginx/conf.d/ssowat.conf:2


I am using YunoHost (YunoHost • index) which empowers me to use multiple applications on one server with easy install and management options. it works on Debian 10/11.

I ran into an issue after installing crowsec recently as follows, as nginx does not starts/restarts:

nginx -t
nginx: [emerg] "init_by_lua_file" directive is duplicate in /etc/nginx/conf.d/ssowat.conf:2
nginx: configuration file /etc/nginx/nginx.conf test failed

if I comment out one line #2 from /etc/nginx/conf.d/ssowat.conf then nginx errors goes away but then YunoHost application single-sign-on fails to work.

lua_shared_dict cache 10m;
init_by_lua_file   /usr/share/ssowat/init.lua;
server_names_hash_bucket_size 128;

How do I fix this, is there any way to use both?

Thank you