# Nginx: \[emerg\] "init\_by\_lua\_file" directive is duplicate in /etc/nginx/conf.d/ssowat.conf:2

**URL:** <https://discourse.crowdsec.net/t/nginx-emerg-init-by-lua-file-directive-is-duplicate-in-etc-nginx-conf-d-ssowat-conf-2/1060>\
**Category:** crowdsec\
**Created:** [December 6, 2022, 2:27am UTC](https://discourse.crowdsec.net/t/nginx-emerg-init-by-lua-file-directive-is-duplicate-in-etc-nginx-conf-d-ssowat-conf-2/1060 "2022-12-06T02:27:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![yashodhan](https://dub1.discourse-cdn.com/flex013/user_avatar/discourse.crowdsec.net/yashodhan/32/489_2.png) [@yashodhan](https://discourse.crowdsec.net/u/yashodhan)\
**Post date:** [December 6, 2022, 2:27am UTC](https://discourse.crowdsec.net/t/nginx-emerg-init-by-lua-file-directive-is-duplicate-in-etc-nginx-conf-d-ssowat-conf-2/1060/1 "2022-12-06T02:27:00Z")

</div>

Hello,

I am using YunoHost ([YunoHost: garden your own piece of the Internet!](https://yunohost.org/#/)) 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`

```sh
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.

##### `/etc/nginx/conf.d/ssowat.conf`

```sh
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
