Welcome! Log In Create A New Profile

Advanced

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

Robert Paprocki
April 28, 2015 06:28PM
It needs to be at the -same- level as the http {} block, not -within- the
http {} block.

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;
}
}

On Tue, Apr 28, 2015 at 2:49 PM, itpp2012 <nginx-forum@nginx.us> wrote:

> 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
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

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

itpp2012 April 28, 2015 05:13PM

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

Maxim Konovalov April 28, 2015 05:34PM

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

Sergey Kandaurov April 28, 2015 05:38PM

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

itpp2012 April 28, 2015 05:49PM

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

Robert Paprocki April 28, 2015 06:28PM

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

itpp2012 April 29, 2015 03:04AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 302
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready