[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
}
相关推荐
lang2015092830 分钟前
MySQL I/O线程优化:提升性能的关键配置
数据库·mysql
Tony Bai1 小时前
【Go开发者的数据库设计之道】05 落地篇:Go 语言四种数据访问方案深度对比
开发语言·数据库·后端·golang
金仓数据库1 小时前
平替MongoDB | 金仓多模数据库助力电子证照国产化实践
数据库·mongodb
海琴烟Sunshine2 小时前
Leetcode 26. 删除有序数组中的重复项
java·算法·leetcode
RoboWizard2 小时前
移动固态硬盘连接手机无法读取是什么原因?
java·spring·智能手机·电脑·金士顿
笨蛋不要掉眼泪2 小时前
SpringBoot项目Excel成绩录入功能详解:从文件上传到数据入库的全流程解析
java·vue.js·spring boot·后端·spring·excel
wshzrf2 小时前
【Java系列课程·Java学前须知】第3课 JDK,JVM,JRE的区别和优缺
java·开发语言·jvm
铅笔侠_小龙虾2 小时前
JVM 深入研究 -- 详解class 文件
java·开发语言·jvm
聪明的笨猪猪2 小时前
面试清单:JVM类加载与虚拟机执行核心问题
java·经验分享·笔记·面试
float_六七2 小时前
SQL流程控制函数完全指南
数据库·sql·adb