[lighttpd]lighttpd配置http强制跳转https

参考链接

HowToRedirectHttpToHttps - Lighttpd - lighty labs

lighttpd版本

复制代码
/ # lighttpd -h
lighttpd/1.4.59 (ssl) - a light and fast webserver
usage:
 -f <name>  filename of the config-file
 -m <name>  module directory (default: /usr/lib)
 -i <secs>  graceful shutdown after <secs> of inactivity
 -1         process single (one) request on stdin socket, then exit
 -p         print the parsed config-file in internal form, and exit
 -t         test config-file syntax, then exit
 -tt        test config-file syntax, load and init modules, then exit
 -D         don't go to background (default: go to background)
 -v         show version
 -V         show compile-time features
 -h         show this help

配置说明

需要增加如下配置

复制代码
$HTTP["scheme"] == "http" {
    url.redirect = ("" => "https://my.test.cn")
    url.redirect-code = 308
}
相关推荐
Nturmoils7 小时前
只面对一张表:KingbaseES 超表如何简化海量时序数据管理
数据库
Diligently_7 小时前
Anolis 系统更新与密码设置&磁盘扩容
java·后端·spring
starrocks_stella7 小时前
StarRocks 如何查询 Paimon 半结构化数据?Variant、Shredding 与 SQL 实践
数据库
mqiqe7 小时前
线程调度与 Schedulers:Project Reactor 并发模型的核心引擎
java·开发语言·网络
我命由我123458 小时前
Android 开发问题:unexpected element <service> found in <manifest>
android·java·java-ee·android studio·android jetpack·android-studio·android runtime
这个DBA有点耶8 小时前
MySQL迁移实战:从mysqldump到专业工具的完整选型指南
数据库·mysql·dba
正在走向自律8 小时前
飞算JavaAI能搞定充电站故障处置吗?
java·ai编程·java开发·飞算javaai·java代码生成·ai coding模型·springboo
小白说大模型8 小时前
LLM集成数据库的幻觉治理:当AI给出的SQL建议是错的
数据库·人工智能·sql·oracle·重构·开源
用户40966601317518 小时前
Guava 不止有 Lists 和 Maps:Cache、EventBus、Multimap 实战
java·后端
DLYSB_8 小时前
从监控告警到现场处置:用 HTTP API、Modbus TCP 构建声光语音告警系统
网络协议·tcp/ip·http·报警灯