linux系统kkFileView 配置https预览文件

思路:

1.kkfile的 context全局路径可以修改 context-path,比如:server.servlet.context-path

2.使用nginx反向代理 /kkfile 转发到 kkfile路径上

官网教程

​​​​​​kkFileView - 在线文件预览

1、配置config/application.properties.

复制代码
server.servlet.context-path=/preview

base.url = https://file.keking.com/preview

2、nginx反向代理

复制代码
#kkFileView的反向代理
	location /preview/ { 
		client_max_body_size  1024m;
		client_body_buffer_size 1024m; 
		
		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;
		proxy_pass http://10.10.1.96:8012/preview/; #该服务的地址
	}
相关推荐
yi碗汤园6 小时前
MQTT消息队列遥测传输协议
网络·网络协议·unity
花间相见7 小时前
【后端开发|网络编程】—— 五种实时通信方案全解析:短轮询、长轮询、SSE、MQTT、WebSocket
后端·网络协议
其实防守也摸鱼11 小时前
DeepSeek Harness 开源贡献手记:从入门到合入主线
服务器·数据库·windows·https·ssl
Lsetea12 小时前
OpenSSL快速生成域名证书:含SAN的自签命令、验证与排错
nginx·https·ssl证书·openssl·自签证书
AKA__Zas13 小时前
跨网段主机的文件传输过程
java·网络·网络协议·学习方法
2501_9160088913 小时前
SSE 和 gRPC 流式接口如何抓包,调试 SSE 与 gRPC 流式接口
网络协议·计算机网络·网络安全·ios·adb·https·udp
其实防守也摸鱼13 小时前
堆叠注入(Stacked Injection)详解
服务器·数据库·windows·https·ssl
鱼月半1 天前
两台电脑直连网络不通怎么办?
linux·网络协议
布莱克6051 天前
HTTP 状态码详解:从分类到实战
计算机网络·http·状态码
StevenSurpass1 天前
打印业务彻底解耦:FastPrintAgent 统一 JSON 模型 + FastReport 引擎的设计与落地
mqtt·http·中间件·打印·fastreport