3

I've installed Nginx on Ubuntu with apt-get. Now i need to somehow add the module:

Their install suggests to recompile Nginx with the module: https://github.com/wandenberg/nginx-push-stream-module/blob/master/README.textile

How can i do that when i have installed Nginx with apt-get?

I want to keep all my current settings and just get the module in there some how

leslie
  • 41

2 Answers2

4

There is a way to do it in Ubuntu!
You can rebuild Ubuntu's Nginx package - and include your module into it.
Then prevent automatic Nginx update with:

sudo aptitude hold nginx
sudo aptitude hold nginx-full

I have written an instruction for myself - My post about Nginx recompilation in Ubuntu with a new module

PS: I hope the link doesn't die very soon. Too lazy to copy-paste everything

Sergey
  • 616
  • That site isn't around anymore. Here's a link to the article in the web archive: http://web.archive.org/web/20140209001217/http://xdev.me/en/article/Recompile_Nginx_deb_package_with_a_new_module – seanlinsley Aug 19 '18 at 21:37
  • It's also a bit out of date. Here's a version that worked for me: https://github.com/wandenberg/nginx-push-stream-module/issues/184#issuecomment-414158118 – seanlinsley Aug 19 '18 at 21:44
2

There is no way to do that.

You need to recompile Nginx plus the module from source, like described in the Nginx Push Stream documentation.

It is not possible to do what you want because Nginx does not support DSO (Dynamic Shared Object) like Apache does. Nginx can't LoadModule since it's design is not for Dynamic Linked binary, it has to link modules during compile time and that is what we call a Statically Compiled (monolithic) binary. With Apache you can load external modules from .so files, but in Nginx you need to compiled the "sbin/nginx" binary with all modules in it, that's why you can't apt-get the module, you need to do some compiling work yourself. Happy hacking.