[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
}
相关推荐
韩立学长7 小时前
【开题答辩实录分享】以《自助游网站的设计与实现》为例进行选题答辩实录分享
java·mysql·spring
ss2737 小时前
线程池:任务队列、工作线程与生命周期管理
java·后端
不像程序员的程序媛7 小时前
Spring的cacheEvict
java·后端·spring
SAP小崔说事儿7 小时前
在数据库中将字符串拆分成表单(SQL和HANA版本)
java·数据库·sql·sap·hana·字符串拆分·无锡sap
凌云若寒7 小时前
半导体代加工企业标签模板痛点的全景式解决方案
java
shoubepatien8 小时前
JAVA -- 11
java·后端·intellij-idea
利剑 -~8 小时前
jdk源码解析
java·开发语言
川贝枇杷膏cbppg8 小时前
asmcmd
数据库·oracle
Predestination王瀞潞8 小时前
JDK安装及环境变量配置
java·linux·开发语言
谷哥的小弟8 小时前
Spring Framework源码解析——PropertiesLoaderUtils
java·后端·spring·框架·源码