Hmm, following:
I get a nginx: [emerg] “stream” directive is not allowed here
eventhough its within the http context like upstreams are, anyone with a
good example? or did I stumble on a context eval bug?
Posted at Nginx Forum:
Hmm, following:
I get a nginx: [emerg] “stream” directive is not allowed here
eventhough its within the http context like upstreams are, anyone with a
good example? or did I stumble on a context eval bug?
Posted at Nginx Forum:
On 4/29/15 12:13 AM, itpp2012 wrote:
Hmm, following: TCP and UDP Load Balancing | NGINX Documentation
I get a nginx: [emerg] “stream” directive is not allowed here
eventhough its within the http context like upstreams are, anyone with a
good example? or did I stumble on a context eval bug?
Put it in the same level as http. E.g.
…
http { foo }
stream { bar }
–
Maxim K.
On 29.04.2015 00:13, itpp2012 wrote:
Hmm, following: TCP and UDP Load Balancing | NGINX Documentation
I get a nginx: [emerg] “stream” directive is not allowed here
eventhough its within the http context
You need to define it in the main context.
See Module ngx_stream_core_module for details.
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;
}
}
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:
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs