From 9684b394a6ee7c01dd191fadb6af2db7ab69bf57 Mon Sep 17 00:00:00 2001 From: zhaodengke Date: Fri, 27 Oct 2023 10:39:29 +0800 Subject: [PATCH] nginx --- README.md | 13 +++++++++++++ ruoyi-admin/src/main/resources/application.yml | 2 +- ruoyi-admin/src/main/resources/logback.xml | 2 +- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index fea6d1a..c97a762 100644 --- a/README.md +++ b/README.md @@ -54,3 +54,16 @@ > * 必须参数: tableId 表ID > * 可选参数: fileType 额外类型 > * 重定向到: `{remote_host}`/file/common/attach, 对应`{remote_host}`/common/attach + + +> 客户服务器nginx配置代理 +``` +location /file_server { + proxy_set_header Host $http_host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header REMOTE-HOST $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + rewrite ^/file_server/(.*)$ /$1 break; + proxy_pass http://localhost:8077; + } +``` \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/application.yml b/ruoyi-admin/src/main/resources/application.yml index 55ca906..2a5abee 100644 --- a/ruoyi-admin/src/main/resources/application.yml +++ b/ruoyi-admin/src/main/resources/application.yml @@ -9,7 +9,7 @@ ruoyi: # 实例演示开关 demoEnabled: true # 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ronxin/uploadPath) - profile: D:/NsgkSoft/files/nsgk/uploadPath + profile: D:/NsgkSoft/files/nsgk_file_transfer/uploadPath # 获取ip地址开关 addressEnabled: false # 验证码类型 math 数字计算 char 字符验证 diff --git a/ruoyi-admin/src/main/resources/logback.xml b/ruoyi-admin/src/main/resources/logback.xml index 0044836..f0dd8c3 100644 --- a/ruoyi-admin/src/main/resources/logback.xml +++ b/ruoyi-admin/src/main/resources/logback.xml @@ -1,7 +1,7 @@ - +