pepeo

1、nginx默认安装时,不包含上传文件模块,需要另外下载。下载地址:

nginx_upload_modul
http://www.grid.net.ru/nginx/upload.en.html
$ wget http://www.grid.net.ru/nginx/download/nginx_upload_module-2.2.0.tar.gz
$ tar xvzf nginx_upload_module-2.2.0.tar.gz (解压)

nginx_uploadprogress_module (监控上传进程的模块 不是必须的)
http://wiki.nginx.org/HttpUploadProgressModule
https://github.com/masterzen/nginx-upload-progress-module/tree/master

2、nginx_upload_module需要编译安装,在编译安装nginx时 --add-moduels=(解压过的模块路径)

3、yum安装的nginx不能添加模块,只能卸载后重新编译安装nginx

4、nginx_upload_module模块已经很旧了,需要打补丁,否则会编译出错,补丁地址:该页面底部有下载

打补丁使用以下命令:

  1. cp darvromaniak.txt [nginx_upload_module所在目录]  
  2. patch ngx_http_upload_module.c davromaniak.txt 

5、打了补丁后还是会编译出错,可能是nginx的版本太新,转到1.6.3后,只有一个报错,很好!

6、查看编译错误信息发现,是 模块.c 文件中的result变量声明后没有使用,打开该文件,将result变量的声明和赋值代码全部注释掉。

7、编译成功。

8、nginx.config设置。 设置还没做好,待续……

 

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2022-02-06
  • 2021-11-21
  • 2021-07-20
  • 2022-01-20
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-12
  • 2021-11-20
  • 2022-12-23
  • 2022-02-13
相关资源
相似解决方案