Include additional files

Jörg Kastning joerg.kastning at
Thu Apr 25 07:08:39 UTC 2013


I have some trouble cleaning up my /etc/nginx/nginx.conf. I have several
upstream and server blocks in this file and it becomes a mess. So I tried
to write each configuration in a seperate file saved in
/etc/nginx/conf.d/loki.conf for example and include them in nginx.conf.

I include the file with the following entry in nginx.conf:
include /etc/nginx/conf.d/loki.conf;

But when reloading/restarting nginx I get the following error:
[emerg] 15941#0: duplicate upstream "loadbalancer" in

I looked around in the Wiki but find no hint.

How can I store my configruations in seperate files and include them?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx mailing list