<div dir="ltr"><div>Ok. So the upstream block has to be in the nginx.conf. I thought I could this one export to a separate file, too.<br><br></div>I was wondering why I still got the error message after I deleted the upstream block in nginx.conf and had it only in my included file. So the upstream configuration must be in nginx.conf?<br>

<div class="gmail_extra"><br><br><div class="gmail_quote">2013/4/25 motto <span dir="ltr"><<a href="mailto:nginx-forum@nginx.us" target="_blank">nginx-forum@nginx.us</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

upstream name should be unique per entire config, you could name it in<br>
nginx.conf and than reference to its name from different your includes.<br>
like:<br>
         upstream loadbalancer  {<br>
                server <a href="http://192.168.0.1:8080" target="_blank">192.168.0.1:8080</a>;<br>
                server <a href="http://192.168.0.2:8080" target="_blank">192.168.0.2:8080</a>;<br>
                server <a href="http://192.168.0.3:8080" target="_blank">192.168.0.3:8080</a>;<br>
                server <a href="http://192.168.0.4:8080" target="_blank">192.168.0.4:8080</a>;<br>
        }<br>
<br>
than in certain location (in included file for example)<br>
            proxy_pass         <a href="http://loadbalancer" target="_blank">http://loadbalancer</a>;<br>
<br>
Posted at Nginx Forum: <a href="http://forum.nginx.org/read.php?2,238628,238629#msg-238629" target="_blank">http://forum.nginx.org/read.php?2,238628,238629#msg-238629</a><br>
<br>
_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
</blockquote></div><br></div></div>