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

推荐订阅源

cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
博客园 - 【当耐特】
博客园 - 聂微东
MyScale Blog
MyScale Blog
T
The Blog of Author Tim Ferriss
F
Full Disclosure
aimingoo的专栏
aimingoo的专栏
H
Help Net Security
Engineering at Meta
Engineering at Meta
Last Week in AI
Last Week in AI
D
DataBreaches.Net
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
宝玉的分享
宝玉的分享
Cyberwarzone
Cyberwarzone
S
Schneier on Security
Know Your Adversary
Know Your Adversary
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
云风的 BLOG
云风的 BLOG
T
Threatpost
D
Darknet – Hacking Tools, Hacker News & Cyber Security
博客园 - 司徒正美
酷 壳 – CoolShell
酷 壳 – CoolShell
Recent Announcements
Recent Announcements
罗磊的独立博客
L
LangChain Blog
L
Lohrmann on Cybersecurity
The GitHub Blog
The GitHub Blog
P
Palo Alto Networks Blog
The Cloudflare Blog
Hacker News - Newest:
Hacker News - Newest: "LLM"
M
MIT News - Artificial intelligence
WordPress大学
WordPress大学
博客园 - Franky
C
Cyber Attacks, Cyber Crime and Cyber Security
S
Securelist
NISL@THU
NISL@THU
L
LINUX DO - 最新话题
PCI Perspectives
PCI Perspectives
V2EX - 技术
V2EX - 技术
IT之家
IT之家
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
N
News | PayPal Newsroom
人人都是产品经理
人人都是产品经理
Google DeepMind News
Google DeepMind News
T
The Exploit Database - CXSecurity.com
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Cisco Talos Blog
Cisco Talos Blog
H
Heimdal Security Blog
Help Net Security
Help Net Security
V
V2EX

博客园 - 浊浊然

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使字体生效,重启服务