如何解决使用Nginx反向代理在Airflow中进行错误的重定向 是应该是
我在Nginx下使用Airflow。效果很好,但是在极少数情况下会将请求发送到不存在的URL。
我的气流在
https://aaa.bbb.com/tools-adm/airflow/admin/
我以 / tools-adm / 作为前缀。它是管理员进入点网页的一部分,列出了不同的工具。
GET请求发送到
是
GET https:/ /aaa.bbb.com/airflow/admin/taskinstance/?flt0_dag_id_equals=task1
应该是
GET https:/ /aaa.bbb.com/tools-adm/airflow/admin/taskinstance/?flt0_dag_id_equals=task1
(空格是为了防止SE降价创建链接,这不是错误)。 大多数GUI都可以正常工作。只是一些晦涩的部分坏掉了,或者不同的拨动开关似乎不起作用。
我的配置
/root/airflow/airflow.cfg
[webserver]
# The base url of your website as airflow cannot guess what domain or
# cname you are using. This is used in automated emails that
# airflow sends to point links to the right web server
base_url = https://edge01.aaa.bbb.com:5150/airflow
/etc/nginx/test.conf
location /airflow {
add_header X-debug "in airflow";
proxy_set_header Host $host;
proxy_redirect off;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_pass http://localhost:5150;
proxy_redirect off;
add_header P3P 'CP="ALL DSP COR PSAa PSDa OUR NOR ONL UNI COM NAV"';
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_ssl_trusted_certificate <redacted>;
proxy_ssl_session_reuse on;
proxy_ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
proxy_ssl_ciphers "EECDH+ECDSA+AES ... P !DSS";
proxy_pass_header Authorization;
proxy_buffering off;
}
当我尝试将端口5150传送到本地计算机时,气流正确重定向。
是nginx问题还是气流问题?大多数GUI都可以正常工作。奇怪的是,某些链接已断开,而某些链接则正常工作。
感谢您的帮助。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。