1

My nginx server was installed by the following approach:

sudo add-apt-repository ppa:nginx/stable
sudo apt-get update && sudo apt-get install nginx

Now I need to https://github.com/vkholodkov/nginx-upload-module/tree/2.2 module to handle image uploading on my server. How could add this module to working nginx production server?

Erik
  • 203
  • 2
  • 5
  • 14

1 Answers1

7

To install additional modules you must compile nginx from source.

  • Download and extract source of nginx (download links)
  • Download and extract source code of desired module's (revision)
  • Compile nginx with module

Actual commands should look something like this:

wget -P /tmp http://nginx.org/download/nginx-1.6.2.tar.gz
tar -zxvf /tmp/nginx-1.6.2.tar.gz -C /tmp

wget -P /tmp https://github.com/vkholodkov/nginx-upload-module/archive/2.2.0.tar.gz
tar -zxvf /tmp/2.2.0.tar.gz -C /tmp

cd /tmp/nginx-1.6.2

./configure --add-module=/tmp/nginx-upload-module-2.2.0
make
make install
rastasheep
  • 186
  • 7
  • Thanks for the answer but installing from `ppa:nginx/stable` gives additional features like (Upstart/SysInit), logrotate and other and don't want to lose them – Erik Apr 12 '15 at 09:51
  • Unfortunately for using modules ppa is not an option, it brings you features out of box but it luck option for using custom modules. Of0course you can enable upstart, logrotate and other stuff that you're using with compiled nginx too. For example here is [upstart script](http://wiki.nginx.org/Upstart) that you need, and [logrotate configuration](http://www.nginxtips.com/how-to-rotate-nginx-logs/). – rastasheep Apr 12 '15 at 10:03
  • http://nginx.org/en/download.html – ADM Apr 12 '15 at 20:06