[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
}
相关推荐
Sirius Wu1 小时前
Maven环境如何正确配置
java·maven
健康平安的活着2 小时前
java之 junit4单元测试Mockito的使用
java·开发语言·单元测试
听雪楼主.2 小时前
Oracle Undo Tablespace 使用率暴涨案例分析
数据库·oracle·架构
我科绝伦(Huanhuan Zhou)2 小时前
KINGBASE集群日常维护管理命令总结
数据库·database
妖灵翎幺2 小时前
Java应届生求职八股(2)---Mysql篇
数据库·mysql
HMBBLOVEPDX2 小时前
MySQL的事务日志:
数据库·mysql
Java小白程序员2 小时前
Spring Framework :IoC 容器的原理与实践
java·后端·spring
xuTao6673 小时前
Easy Rules 规则引擎详解
java·easy rules
m0_480502644 小时前
Rust 入门 KV存储HashMap (十七)
java·开发语言·rust
杨DaB4 小时前
【SpringBoot】Swagger 接口工具
java·spring boot·后端·restful·swagger