参考链接
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
}