1.9 stream not working? 'directive is not allowed here'

itpp2012 nginx-forum at nginx.us
Tue Apr 28 21:49:08 UTC 2015


Minimal conf;

worker_processes  4;

events {
    worker_connections  8192;
}

http {
    include       mime.types;
    default_type  application/octet-stream;

    stream {
        upstream stream_backend {
            server 192.168.222.22:810 weight=5;
            server 192.168.222.17:810 weight=5;
        }
    }

    server {
        listen     12345;
        proxy_pass stream_backend;
    }

}

nginx -t
nginx: [emerg] "stream" directive is not allowed here in conf\nginx.conf:11
nginx: configuration file conf\nginx.conf test failed

Whats incorrect here then?

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,258463,258467#msg-258467



More information about the nginx mailing list