[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
}
相关推荐
电商API_1800790524722 分钟前
第三方淘宝商品详情 API 全维度调用指南:从技术对接到生产落地
java·大数据·前端·数据库·人工智能·网络爬虫
一点程序36 分钟前
基于SpringBoot的选课调查系统
java·spring boot·后端·选课调查系统
C雨后彩虹38 分钟前
计算疫情扩散时间
java·数据结构·算法·华为·面试
2401_8321319539 分钟前
Python单元测试(unittest)实战指南
jvm·数据库·python
2601_9498095942 分钟前
flutter_for_openharmony家庭相册app实战+我的Tab实现
java·javascript·flutter
vx_BS813301 小时前
【直接可用源码免费送】计算机毕业设计精选项目03574基于Python的网上商城管理系统设计与实现:Java/PHP/Python/C#小程序、单片机、成品+文档源码支持定制
java·python·课程设计
2601_949868361 小时前
Flutter for OpenHarmony 电子合同签署App实战 - 已签合同实现
java·开发语言·flutter
打工的小王1 小时前
redis(四)搭建哨兵模式:一主二从三哨兵
数据库·redis·缓存
Anarkh_Lee2 小时前
【小白也能实现智能问数智能体】使用开源的universal-db-mcp在coze中实现问数 AskDB智能体
数据库·人工智能·ai·开源·ai编程
达文汐2 小时前
【困难】力扣算法题解析LeetCode332:重新安排行程
java·数据结构·经验分享·算法·leetcode·力扣