跳到正文
TURNKEYGNU / LINUX
应用文档博客截图GitHubTurnKey Hub
文中文
EnglishEspañol中文日本語PortuguêsDeutsch
ưμ㼯A/如何配置 LigHTTPd( aka Lighty) 。

文档

如何配置 LigHTTPd( aka Lighty) 。

分享一些笔记是因为我没有;没有更好的地方可以放这些笔记。

拒绝访问子目录

# deny access to /data
$HTTP["url"] =~ "^/data" {
    url.access-deny = ("")
}

将 https 重定向到 https

正在启用 https 上显示。 同时确定您已经装入了 mod_ redirect 。 例如, 在您的 /etc/lighttpd/lighttpd.conf: 中此选项

server.modules              = (
            ...
            "mod_redirect",
 )

然后这个:

# redirect all http to https
$HTTP["scheme"] == "http" {
    # capture vhost name with regex conditiona -> %0 in redirect pattern
    # must be the most inner block to the redirect rule
    $HTTP["host"] =~ ".*" {
        url.redirect = (".*" => "https://%0$0")
    }
}
TURNKEYGNU / LINUX

无需从零开始,掌控自己的基础设施。

探索 TurnKey
关于文档常见问题博客GitHub
自由开源默认安全随时可部署