[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
}
相关推荐
Uranus^几秒前
使用Spring Boot与Spring Security构建安全的RESTful API
java·spring boot·spring security·jwt·restful api
Aiden Targaryen2 分钟前
Windows/MacOS WebStorm/IDEA 中开发 Uni-App 配置
java·uni-app·webstorm
啾啾Fun12 分钟前
【Java微服务组件】分布式协调P1-数据共享中心简单设计与实现
java·分布式·微服务
神经毒素41 分钟前
WEB安全--Java安全--shiro550反序列化漏洞
java·安全·web安全·shiro
Think Spatial 空间思维1 小时前
【HTTPS基础概念与原理】TLS握手过程详解
数据库·网络协议·https
hnlucky1 小时前
Windows 上安装下载并配置 Apache Maven
java·hadoop·windows·学习·maven·apache
laowangpython1 小时前
MySQL基础面试通关秘籍(附高频考点解析)
数据库·mysql·其他·面试
2501_915909061 小时前
开发日常中的抓包工具经验谈:Charles 抓包工具与其它选项对比
websocket·网络协议·tcp/ip·http·网络安全·https·udp
mooyuan天天1 小时前
SQL注入报错“Illegal mix of collations for operation ‘UNION‘”解决办法
数据库·web安全·sql注入·dvwa靶场·sql报错
运维-大白同学2 小时前
go-数据库基本操作
开发语言·数据库·golang