<div dir="ltr"><div><div><div><div><div><div>Hi.<br><br></div>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.<br>
<br></div><div>I include the file with the following entry in nginx.conf:<br></div><div>include /etc/nginx/conf.d/loki.conf;<br></div><div><br></div>But when reloading/restarting nginx I get the following error:<br>[emerg] 15941#0: duplicate upstream "loadbalancer" in /etc/nginx/conf.d/loki.conf:1<br>
<br></div>I looked around in the Wiki but find no hint.<br><br></div>How can I store my configruations in seperate files and include them?<br><br></div>Greetz<br><br></div>Joerg<br>
</div>