gpt4 book ai didi

apache - 使用 nginx 作为反向代理运行 Apache Zeppelin

转载 作者:行者123 更新时间:2023-12-02 07:04:45 26 4
gpt4 key购买 nike

在我们当前的架构中,我们有两个 apache 前端服务器,在它们前面,我们有一个 nginx 负载均衡器。在它前面是一个 nginx 反向代理。

我的问题是,我正在尝试通过反向代理运行 Apache Zeppelin,但我在使用 Websockets 时遇到了一些问题。

我收到如下错误:400 HTTP 方法 GET 不受此 URL 支持

这是 Chrome 网络选项卡显示内容的屏幕截图: enter image description here

我为 Zeppelin 添加反向代理配置:

error_log  /var/log/nginx/nginx_error.log  warn;
server {
listen 80;
server_name localhost;

location /zeppelin/ {
proxy_pass http://zeppelin:8080/;
proxy_http_version 1.1;
proxy_set_header Upgrade websocket;
proxy_set_header Connection upgrade;
}

# fallback
location / {
return 301 http://ci.blablalablab.com/app/;
}
}

Zeppelin 正在 Docker 容器内运行,并且我公开了 8080 端口,其主机名是:zeppelin。

如果您对架构等有任何疑问,请随时提问。

非常感谢大家!

最佳答案

您可以添加到您的反向代理配置

location /ws {  # For websocket support
proxy_pass http://zeppelin:8080/ws;
proxy_http_version 1.1;
proxy_set_header Upgrade websocket;
proxy_set_header Connection upgrade;
proxy_read_timeout 86400;
}

引用:Zeppelin 0.7 auth docs

关于apache - 使用 nginx 作为反向代理运行 Apache Zeppelin,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42862731/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com