I want to proxy mongodb behind nginx. And I came across following code for same purpose.
My question is, how can I enable "stream" module in nginx?
stream {
server {
listen 27020;
proxy_connect_timeout 5s;
proxy_timeout 20s;
proxy_pass mongodb_host;
}
upstream mongodb_host{
server xx.xxx.xxx.xx:27017;
}
}