[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
}
相关推荐
剩下了什么11 分钟前
MySQL JSON_SET() 函数
数据库·mysql·json
山峰哥41 分钟前
数据库工程与SQL调优——从索引策略到查询优化的深度实践
数据库·sql·性能优化·编辑器
较劲男子汉1 小时前
CANN Runtime零拷贝传输技术源码实战 彻底打通Host与Device的数据传输壁垒
运维·服务器·数据库·cann
老毛肚1 小时前
MyBatis体系结构与工作原理 上篇
java·mybatis
java搬砖工-苤-初心不变1 小时前
MySQL 主从复制配置完全指南:从原理到实践
数据库·mysql
风流倜傥唐伯虎1 小时前
Spring Boot Jar包生产级启停脚本
java·运维·spring boot
Yvonne爱编码1 小时前
JAVA数据结构 DAY6-栈和队列
java·开发语言·数据结构·python
Re.不晚2 小时前
JAVA进阶之路——无奖问答挑战1
java·开发语言
liulovesong2 小时前
2024/06/21/第三天
http·echarts
你这个代码我看不懂2 小时前
@ConditionalOnProperty不直接使用松绑定规则
java·开发语言