How to add nginx HTTP Push Stream module through LEMP droplet

September 22, 2015 2.8k views
Nginx LEMP Linux Basics Deployment Ubuntu


Does anyone has successfully installed the nginx-push-stream-module in a LEMP droplet?

I need to implement a push / stream service. I decided to get an ubuntu LEMP server and install the nginx push stream module hosted by Wandenberg. I followed the Install it by yourself tutorial section written in official nginx documentation here. But the example builds a completely new nginx instance. It also does not work. I followed the instruction properly. Built and run properly. But I got an error unknown directive "pushchannelgroup", which is the first "push stream" instruction nginx interprets in server config.

Is there a cleaner way to add nginx-push-stream-module in my LEMP nginx droplet's instance, or I have to re-build nginx like it says in the documentation? Does building a new nginx instance would interfere with the default nginx instance in my droplet?

I'm a bit confused. And also relatively new with linux OS.

Thank you for your help

1 Answer

Nginx did not release dynamic module loading until the recent 1.9.11 release:

Up until now, if you wanted to create a module for NGINX you had to compile it into an NGINX binary along with the NGINX source code. The module was loaded with NGINX every time, whether you wanted it or not. For packagers of operating system distributions, this made it very hard to create custom NGINX binaries for every user.

So unfortunately for earlier versions, there isn't a cleaner way than rebuilding Nginx altogether. If you are using a new enough version, converting it to be a dynamic module is fairly straightforward.

Have another answer? Share your knowledge.