我正在寻求将 lighttpd 配置转换为 Nginx 一个:
$HTTP["url"] =~ "^/(static/icons/|static/fonts/|static/translations/|static/images/|static/panels/|static/polyfills|api/|auth/|frontend_latest/|frontend_es5/|local/|lovelace|map|config|developer-tools|history|logbook|profile|states|hassio|onboarding.html|service_worker.js|authorize.html|manifest.json)" {
proxy.server = ( "" => ( ( "host" => "127.0.0.1", "port" => "8123" ) ) )
proxy.header = ( "upgrade" => "enable" )
server.stream-request-body = 2
server.stream-response-body = 2
}
$HTTP["querystring"] =~ "(auth_callback=|homescreen=|external_auth=)" {
proxy.server = ( "" => ( ( "host" => "127.0.0.1", "port" => "8123" ) ) )
proxy.header = ( "upgrade" => "enable" )
server.stream-request-body = 2
server.stream-response-body = 2
}
我正在尝试将我的 Home Assistant 实例放在域的子目录中。 HA 不是为那样工作而设计的,并且在我使用 Nginx 代理管理器时发现了一个 hack,但用于 lighttpd 服务器。
我试过的:
location /ha{
proxy_pass http://192.168.88.3:8123/;
}
然而,这不起作用。只有 HA 标志加载,但没有资产。