type
status
date
slug
summary
tags
category
icon
password
搭建alist是真不难,无论是docker还是一键安装脚本,都很简单,烦的的是如何给alist添加SSL证书,以https访问alist服务
Nginx反代
在网站配置文件的 server 字段中添加
如果需要使用HTTP/3,需要将对应
HOST
行修改为:这样修改后的配置同时也可以兼容HTTP/2及更低版本的请求。
注意
如果使用宝塔面板,请务必删除以下默认配置
并在
/www/server/nginx/conf/proxy.conf
中或对应网站配置文件中设置禁用Nginx缓存,否则默认配置下访问较大文件时Nginx会先尝试将远程文件缓存至本机,导致播放失败Apache
在 VirtualHost 字段下添加配置项 ProxyPass,如:
Caddy
在 Caddyfile 文件下添加 reverse_proxy,如:
如果部署在 443 端口正常使用的服务器上且使用域名进行访问,建议使用这种配置让 Caddy 自动申请证书:
宝塔设置反向代理示范
1.登录宝塔面板,添加站点;

2.修改站点设置;

3.删除面板默认代码;


4.添加反向代理;

如需申请SSL证书,可先在SSL选项中申请证书,然后在设置反向代理。或者设置反向代理之后,关闭反向代理功能,申请SSL证书后再次开启代理。
- Author:Gweek
- URL:https://www.myla.eu.org/article/alistssl
- Copyright:All articles in this blog, except for special statements, adopt BY-NC-SA agreement. Please indicate the source!