soulteary / docker-flare

Flare ✨ Lightweight, high performance and fast self-hosted navigation pages, resource utilization rate is <1% CPU, MEM <30 M, Docker Image < 10M

Home Page:https://soulteary.com/2022/02/23/building-a-personal-bookmark-navigation-app-from-scratch-flare.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

怎么开启https?

sangshaoxuan opened this issue · comments

你遇到了什么样的麻烦?

怎么开启https?没有找到说明

如何复现这个问题?

·

应用版本

03年5月版本

搜索

  • 在提交这个表格之前,我已经进行了相关问题搜索,没有找到相关的问题或解决方案。

补充描述

No response

😒 使用 nginx 等反代呀。。。

https://www.zhihu.com/search?type=content&q=flare
看作者知乎,里面提到使用traefik进行反代。

可以使用nginx反向代理

将文件命名为 flare_ng.conf 放在nginx 的 conf.d 目录下

其中你的IP可以是本地的内网IP,如果是外网IP可能要放通防火墙

`upstream 你的域名 {
server 你的IP:5005;
}

server {
listen 80 ;
listen 443 ssl ;
ssl_certificate 尾缀是pem的证书文件路径;
ssl_certificate_key 尾缀是key的证书文件路径;
server_name 你的域名 ;
if ($scheme != "https") {
return 301 https://$host$request_uri;
}
location / {
proxy_pass http://你的IP:5005;
proxy_set_header Via "nginx";
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_set_header Connection $connection_upgrade;
proxy_cache_bypass $http_upgrade;
client_max_body_size 0;
}

}`