一个开源可部署轻量导航站
开源地址:https://github.com/Mereithhh/van-nav/releases/tag/v1.1.8




开源: (github.com)
使用方法
Docker
docker run -d --name tools --restart always -p 6412:6412 -v /path/to/your/data:/app/data mereith/van-nav:latest
打开浏览器 http://localhost:6412 即可访问。
- 默认端口 6412
- 默认账号密码 admin admin ,第一次运行后请进入后台修改
- 数据库会自动创建在当前文件夹中:
nav.db
可执行文件
下载 release 文件夹里面对应平台的二进制文件,直接运行即可。
打开浏览器 http://localhost:6412 即可访问。
- 默认端口 6412
- 默认账号密码 admin admin ,第一次运行后请进入后台修改
- 数据库会自动创建在当前文件夹中:
nav.db
nginx 反向代理
参考配置
其中 <yourhost> 和 <your-cert-path> 替换成你自己的。
server {
listen 80;
server_name ;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl http2;
server_name ;
ssl_certificate
ssl_certificate_key ;
ssl_verify_client off;
proxy_ssl_verify off;
location / {
proxy_pass http://127.0.0.1:6412;
proxy_set_header Host $http_host;
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;
proxy_redirect off;
proxy_set_header Upgrade $http_upgrade;
}
}
systemd 服务
可以注册成系统服务,开机启动。
-
复制二进制文件到
/usr/local/bin目录下,并加上执行权限 -
新建
VanNav.serivce文件于/usr/lib/systemd/system目录下:
[Unit]
Description=VanNav
Documentation=https://github.com/mereithhh/van-nav
After=network.target
Wants=network.target
[Service]
WorkingDirectory=/usr/local/bin
ExecStart=/usr/local/bin/nav
Restart=on-abnormal
RestartSec=5s
KillMode=mixed
StandardOutput=null
StandardError=syslog
[Install]
WantedBy=multi-user.target
- 执行:
sudo systemctl daemon-reload && sudo systemctl enable --now VanNav.service