[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
}
相关推荐
风象南8 分钟前
SpringBoot的4种死信队列处理方式
java·spring boot·后端
互联网全栈架构1 小时前
遨游Spring AI:第一盘菜Hello World
java·人工智能·后端·spring
优秀的颜2 小时前
计算机基础知识(第五篇)
java·开发语言·分布式
BillKu2 小时前
Java严格模式withResolverStyle解析日期错误及解决方案
java
网安INF2 小时前
ElGamal加密算法:离散对数难题的安全基石
java·网络安全·密码学
AWS官方合作商3 小时前
在CSDN发布AWS Proton解决方案:实现云原生应用的标准化部署
java·云原生·aws
gadiaola4 小时前
【JVM】Java虚拟机(二)——垃圾回收
java·jvm
Zfox_4 小时前
Redis:Hash数据类型
服务器·数据库·redis·缓存·微服务·哈希算法
陈丹阳(滁州学院)6 小时前
若依添加添加监听容器配置(删除键,键过期)
数据库·oracle
coderSong25687 小时前
Java高级 |【实验八】springboot 使用Websocket
java·spring boot·后端·websocket