hnasr/javascript_playground

Error: unknown directive "stream" for Layer 4 loadbalancer

Opened this issue · 0 comments

OS: Ubuntu 20.04LTS
Nginx version: nginx/1.18.0 (Ubuntu)

Even after changing http to stream in the nginx.conf while creating the layer 4 load balancer I was getting this error:-
nginx: [emerg] unknown directive "stream" in /etc/nginx/nginx.conf

I found a solution to that here

If you are facing the error then add this line on top of nginx.conf:-
load_module /usr/lib/nginx/modules/ngx_stream_module.so;
and restart Nginx with sudo nginx -s reload
It should work now.

Creating this issue so that if anyone is facing same problem then this should solve that.