HanG321 Blog

upload file on nginx – part 2: MySQL PAM and nginx config

MySQL PAM Config

set up database table and column name for username and password

# vim /etc/pam.d/nginx

 

in nginx config (/etc/nginx/nginx or /etc/nginx/conf.d/)

 

Upload module config

in nginx config (/etc/nginx/nginx or /etc/nginx/conf.d/)

php file upload handler example can be found on https://github.com/blueimp/jQuery-File-Upload/wiki/Uploading-to-nginx-using-the-nginx-upload-module-with-php_handler and https://github.com/blueimp/jQuery-File-Upload/tree/master/server/php