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
https://soulteary.com/2022/02/23/building-a-personal-bookmark-navigation-app-from-scratch-flare.html
Creative Commons Zero v1.0 Universal
1.76k stars 148 forks source link

怎么开启https? #133

Open sangshaoxuan opened 1 year ago

sangshaoxuan commented 1 year ago

你遇到了什么样的麻烦?

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

如何复现这个问题?

·

应用版本

03年5月版本

搜索

补充描述

No response

LightAPIs commented 1 year ago

😒 使用 nginx 等反代呀。。。

thelittlefox commented 11 months ago

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

lioooooh commented 10 months ago

可以使用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; }

}`

blog2020 commented 1 week ago

可以使用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; }

}`

如果想使用二级路径访问,该怎么写nginx配置呢? location /flare2/ { proxy_pass http:127.0.0.1:5005/ } 无论怎么写都是报错404