HanG321 Blog

upload file on nginx – part 1: compile dynamic modules

Recently  I was assigned to a task about adding a file upload feature to a existing nginx server on CentOS. Nginx was chosen years ago because it simply handles some static files only. If the file upload was a requirement, using apache is simpler as computation power isn’t a constraint in our case.

Background

  1. CentOS 7
  2. nginx 1.10.2
  3. nginx-upload-module
  4. ngx_http_auth_pam_module

Compile Dynamic modules

Download upload and auth pam module source code. Then find out the current nginx version, download the source code and compile modules