【问题标题】:lighttpd reverse proxy | http://xxx:port -> http://xxx/catalog/index.htmllighttpd 反向代理| http://xxx:port -> http://xxx/catalog/index.html
【发布时间】:2015-05-06 20:41:50
【问题描述】:

我有关于代理的问题。

我在 xxx:port 上有内容(来自 Motion raspberry pi 的直播)。我想将其公开,但议案现在不提供任何身份验证方法(在以前的版本中,但没有 ATM ......)我想将发往 http://xxx:port 的流量重定向到我在树莓上的安全目录 @987654322 @。

我在 lighttpd 方面没有经验,我试图在这里和谷歌上搜索示例,但这些示例与站点 站点代理相关,而不是端口 -> 目录。

提前谢谢你:) MacieX

【问题讨论】:

    标签: redirect proxy rewrite reverse lighttpd


    【解决方案1】:

    这听起来像是您只是在寻找一个简单的重定向。

    在您的 lighttpd.conf 中启用 mod_redirect。

    server.modules = (
        .
        "mod_redirect", ## uncomment or add this line
        "mod_rewrite",
        .
        .
        .
    )
    

    然后将以下内容添加到文件末尾...

     $SERVER["socket"] == ":8080" {
        url.redirect = (
            ".*" => "http://example.com/catalog/index.html"
        )
     }
    

    这会将请求重定向到端口 8080 到您的目录。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-07-25
      • 2019-01-15
      • 1970-01-01
      • 2011-06-19
      • 1970-01-01
      • 2017-07-10
      • 1970-01-01
      • 2023-01-27
      相关资源
      最近更新 更多