[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

airflow webserver + base url prefix + nginx reverse proxy

Hi all,
I am trying to test the reverse proxy feature (available from this PR :
The feature is not release yet so I am testing it from the master branch.
I am following the doc here :
I have updated the base_url property in the airflow.cfg and set the server conf of nginx :
# base_url in airflow.cfg
base_url = http://localhost/airflow/

## nginx conf :
server {
    listen 80;
    server_name localhost;
    location /airflow {
      proxy_pass http://localhost:8080/;
      proxy_set_header Host $host;
      proxy_redirect off;
      proxy_http_version 1.1;
      proxy_set_header Upgrade $http_upgrade;
      proxy_set_header Connection "upgrade";

I keep getting a 404 error when I hit : http://localhost/airflow because the server send a redirect response with location header set to  http://localhost/admin and the /admin location is not defined in my nginx.  I want all of the airflow webserver to be under /airflow .

When I hit http://localhost/airflow/admin it works but all the links on the pages refer to /admin so it’s not good. It looks like the base_url property is not taken into account ?
Anyone have seen this before or have the reverse proxy with airflow webserver ? Many thanks


The information in this email (and any attachments) is confidential and is intended solely for the use of the individual or entity to whom it is addressed. If you received this email in error please tell us by reply email (or telephone the sender) and delete all electronic copies on your system or other copies known to you. Trainline Investments Holdings Limited (Registered No.5776685), Limited (Registered No. 3846791) and Trainline International Limited (Registered No. 6881309) are all registered in England and Wales with registered office at 3rd floor, 120 Holborn, London, EC1N 2TD.