惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Stack Overflow Blog
Stack Overflow Blog
Recent Announcements
Recent Announcements
Microsoft Security Blog
Microsoft Security Blog
L
LINUX DO - 最新话题
P
Privacy & Cybersecurity Law Blog
Google DeepMind News
Google DeepMind News
Security Archives - TechRepublic
Security Archives - TechRepublic
云风的 BLOG
云风的 BLOG
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - Franky
PCI Perspectives
PCI Perspectives
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
TaoSecurity Blog
TaoSecurity Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Attack and Defense Labs
Attack and Defense Labs
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
P
Proofpoint News Feed
小众软件
小众软件
A
Arctic Wolf
C
Cybersecurity and Infrastructure Security Agency CISA
F
Fortinet All Blogs
T
Threatpost
Security Latest
Security Latest
V
Vulnerabilities – Threatpost
B
Blog RSS Feed
MongoDB | Blog
MongoDB | Blog
WordPress大学
WordPress大学
Forbes - Security
Forbes - Security
H
Hackread – Cybersecurity News, Data Breaches, AI and More
C
CERT Recently Published Vulnerability Notes
AI
AI
博客园 - 三生石上(FineUI控件)
T
Threat Research - Cisco Blogs
Recent Commits to openclaw:main
Recent Commits to openclaw:main
S
Schneier on Security
I
Intezer
The GitHub Blog
The GitHub Blog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
V
V2EX
aimingoo的专栏
aimingoo的专栏
量子位
NISL@THU
NISL@THU
N
News and Events Feed by Topic
O
OpenAI News
Microsoft Azure Blog
Microsoft Azure Blog
C
Check Point Blog
Schneier on Security
Schneier on Security
S
Secure Thoughts
The Cloudflare Blog
J
Java Code Geeks

博客园 - 浊浊然

css毛玻璃效果 createjs 实现场景拖动、滚轮放大缩小 createjs 实现图片拖动 node-sass 安装不上的问题 nodejs 搭建本地服务器 微信小程序,真机上接口调不通 mysql 去除字段中 空格 制表符等 用jeesite做后台开发,新写了个前端业务系统的权限问题 uniapp 打包app 用到地图相关 升级node最新版本18.x .Error: error:0308010C js 读取url中参数值 linux php 安装oci8 electron nativefier打包网址 electron-winstaller制作安装包 h5+ 上传图片(选择图片、拍照) phpword 导出word,文件已损坏问题 Vscode 右键 open with code 没有的情况,使用以下注册表脚本 PhpSpreadsheet导出excel apache https小程序android ssl error js获取url参数,以及中文乱码问题 微信js上传图片并 展示,iphone下预览
kkfileview5 安装
浊浊然 · 2026-05-28 · via 博客园 - 浊浊然

拉取最新代码:https://gitee.com/kekingcn/file-online-preview

idea打开项目,5.0版本java版本为21,maven打包会生成压缩包,上传服务器,bin目录执行startup.sh,linux会自动安装相关软件

官方文档地址:https://kkview.cn/zh-cn/docs/production.html

nginx代理配置:

location /kkfileview/ {
    proxy_pass http://127.0.0.1:8012/;
    # 核心配置:传递真实的 Host、IP 和协议信息
    proxy_set_header Host $host:$server_port;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;  # 如果是 HTTPS,这一项非常重要
    proxy_set_header X-Forwarded-Host $host;
    
    proxy_http_version 1.1;
    proxy_set_header Connection "";
}

#如果是宝塔面板,需要注释配置文件中的,其他环境也一样
# location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
# {
#     expires      30d;
#     error_log off;
#     access_log /dev/null;
# }
    
# location ~ .*\.(js|css)?$
# {
#     expires      12h;
#     error_log off;
#     access_log /dev/null; 
# }

预览地址:'https://xxxx.com/kkfileview/onlinePreview?url='+encodeURIComponent(Base64.encode('文件访问地址'))

代理访问时application.properties需要修改的地方:

# 设置基础访问地址,填写你外部访问 Nginx 的完整地址,与代理一致
base.url=https://你的域名或公网IP/kkfileview

# 信任站点白名单配置,多个用','隔开
# ⚠️ 安全提示:为防止SSRF攻击,强烈建议配置信任主机白名单
# ⚠️ 如果不配置,系统将默认拒绝所有外部文件预览请求
# 配置示例:
# trust.host = kkview.cn,yourdomain.com,cdn.example.com
# 如果需要允许所有域名(不推荐,仅用于测试环境),请设置为:
# trust.host = *
# 当前配置:默认本机测试 (正式启用请修改)
# trust.host = ${KK_TRUST_HOST:default}
trust.host = *.xxxx.com,a.xxx.com

linux中文乱码,下载如下字体包 https://kkview.cn/resource/fonts.zip 文件解压完整拷贝到Linux下的 /usr/share/fonts目录。然后依次执行mkfontscale 、mkfontdir 、fc-cache使字体生效,重启服务