博客
关于我
nginx upload module安装及使用
阅读量:597 次
发布时间:2019-03-07

本文共 1041 字,大约阅读时间需要 3 分钟。

下载

下载最新版本的Nginx压缩服务器软件。您可以通过官方网站或包管理器获取安装包,确保选择适合您的操作系统版本。

安装

./configure --prefix=/opt/yliyun/openresty --add-module=/opt/nginx_upload_module-2.2.0 make make install

按照上述命令进行安装,确保所有依赖项已正确安装。安装完成后,测试基本功能以确认配置无误。

nginx配置

# upload settings  
upload_pass_args on;
upload_limit_rate 100m;
upload_store /opt/yliyun/temp;
upload_set_form_field $upload_field_name.name "$upload_file_name";
upload_set_form_field $upload_field_name.path "$upload_tmp_path";
upload_aggregate_form_field "$upload_field_name.md5" "$upload_file_md5";
upload_aggregate_form_field $upload_field_name.crc32 $upload_file_crc32;
upload_aggregate_form_field "$upload_field_name.size" "$upload_file_size";
upload_pass_form_field "param";
upload_cleanup 200-299 400-499 500-505;
location = /apps/upload/file {
proxy_set_header x-real-ip $remote_addr;
upload_pass @lua-upload;
}
location @lua-upload {
default_type 'application/json;charset=utf-8';
content_by_lua_file /opt/yliyun/work/lua/upload/single_upload.lua;
}

以上配置示例适用于在Nginx中集成Lua脚本进行文件上传处理,确保每个步骤都与实际服务器环境相符。

转载地址:http://jrlcz.baihongyu.com/

你可能感兴趣的文章
PB级分析型数据库ClickHouse的应用场景和特性
查看>>
pc3-12800
查看>>
PCA---主成成分分析
查看>>
pca算法
查看>>
PCA降维demo
查看>>
SharePoint 2013 图文开发系列之定义站点模板
查看>>
PCB设计十条黄金法则
查看>>
SpringSecurity框架介绍
查看>>
PCI Express学习篇:Power Management(二)
查看>>
pcie握手机制_【博文连载】PCIe扫盲——Ack/Nak 机制详解(一)
查看>>
pcm转wav的方法及代码示例
查看>>
PC史上最悲剧的16次失败
查看>>
PC端恶意代码分析Lab1.1-5.1,从零基础到精通,收藏这篇就够了!
查看>>
PC端稳定性测试探索
查看>>
PC端编辑 但能在PC端模拟移动端预览的富文本编辑器
查看>>
PDB文件:每个开发人员都必须知道的
查看>>
springMVC学习(二)
查看>>
Pdfkit页眉和页脚
查看>>
PDF中的Pandoc语法突出显示不起作用
查看>>
pdf从结构新建书签_在PDF文件中怎样创建书签
查看>>