博客
关于我
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/

你可能感兴趣的文章
Net任意String格式转换为DateTime类型
查看>>
net包之IPConn
查看>>
net发布的dll方法和类显示注释信息(字段说明信息)[图解]
查看>>
Net和T-sql中的日期函数操作
查看>>
Net处理html页面元素工具类(HtmlAgilityPack.dll)的使用
查看>>
Net操作Excel(终极方法NPOI)
查看>>
Net操作配置文件(Web.config|App.config)通用类
查看>>
net网络查看其参数state_dict,data,named_parameters
查看>>
Net连接mysql的公共Helper类MySqlHelper.cs带MySql.Data.dll下载
查看>>
NeurIPS(神经信息处理系统大会)-ChatGPT4o作答
查看>>
neuroph轻量级神经网络框架
查看>>
Neutron系列 : Neutron OVS OpenFlow 流表 和 L2 Population(7)
查看>>
new Blob()实现不同类型的文件下载功能
查看>>
New Concept English three (35)
查看>>
NEW DATE()之参数传递
查看>>
New Journey--工作五年所思所感小记
查看>>
new Queue(REGISTER_DELAY_QUEUE, true, false, false, params)
查看>>
New Relic——手机应用app开发达人的福利立即就到啦!
查看>>
new work
查看>>
new 一个button 然后dispose,最后这个button是null吗???
查看>>