<div dir="ltr"><span style="font-size:12.8000001907349px">It needs to be at the -same- level as the http {} block, not -within- the http {} block.</span><div style="font-size:12.8000001907349px"><br></div><div style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">worker_processes  4;</span><br style="font-size:12.8000001907349px"><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">events {</span><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">    worker_connections  8192;</span><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">}</span><br style="font-size:12.8000001907349px"><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">http {</span><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">    include       mime.types;</span><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">    default_type  application/octet-stream;</span></div><div style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">}</span><br style="font-size:12.8000001907349px"><br><span style="font-size:12.8000001907349px">stream {</span><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">    upstream stream_backend {</span><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">        server </span><a href="http://192.168.222.22:810/" target="_blank" style="font-size:12.8000001907349px">192.168.222.22:810</a><span style="font-size:12.8000001907349px"> weight=5;</span><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">        server </span><a href="http://192.168.222.17:810/" target="_blank" style="font-size:12.8000001907349px">192.168.222.17:810</a><span style="font-size:12.8000001907349px"> weight=5;</span></div><div style="font-size:12.8000001907349px">    }</div><div style="font-size:12.8000001907349px">    <span style="font-size:12.8000001907349px">server {</span><div style="font-size:12.8000001907349px">        listen     12345;</div><div style="font-size:12.8000001907349px">        proxy_pass stream_backend;</div><div style="font-size:12.8000001907349px">    }</div><span style="font-size:12.8000001907349px">}</span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Apr 28, 2015 at 2:49 PM, itpp2012 <span dir="ltr"><<a href="mailto:nginx-forum@nginx.us" target="_blank">nginx-forum@nginx.us</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Minimal conf;<br>
<br>
worker_processes  4;<br>
<br>
events {<br>
    worker_connections  8192;<br>
}<br>
<br>
http {<br>
    include       mime.types;<br>
    default_type  application/octet-stream;<br>
<br>
    stream {<br>
        upstream stream_backend {<br>
            server <a href="http://192.168.222.22:810" target="_blank">192.168.222.22:810</a> weight=5;<br>
            server <a href="http://192.168.222.17:810" target="_blank">192.168.222.17:810</a> weight=5;<br>
        }<br>
    }<br>
<br>
    server {<br>
        listen     12345;<br>
        proxy_pass stream_backend;<br>
    }<br>
<br>
}<br>
<br>
nginx -t<br>
nginx: [emerg] "stream" directive is not allowed here in conf\nginx.conf:11<br>
nginx: configuration file conf\nginx.conf test failed<br>
<br>
Whats incorrect here then?<br>
<br>
Posted at Nginx Forum: <a href="http://forum.nginx.org/read.php?2,258463,258467#msg-258467" target="_blank">http://forum.nginx.org/read.php?2,258463,258467#msg-258467</a><br>
<div class="HOEnZb"><div class="h5"><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>
</div></div></blockquote></div><br></div>