How to install nginx-upload-module on production server?

10,592

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
Share:
10,592

Related videos on Youtube

Erik
Author by

Erik

Updated on September 18, 2022

Comments

  • Erik
    Erik almost 2 years

    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?

    • ADM
      ADM about 9 years
      use openresty, tengine, or compile your modules from source...
    • Erik
      Erik about 9 years
      could you provide brief tutorial for compiling from source?
  • Erik
    Erik about 9 years
    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
  • rastasheep
    rastasheep about 9 years
    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 that you need, and logrotate configuration.
  • ADM
    ADM about 9 years