GitHub user klobass-skoda edited a discussion: Airflow 3.0.3 beind traefik 
reverse proxy gives 404 on resources

Hello 

I just deployed traefik_3.0.3 in the swarm running on single node with all 
services behind reverse proxy (traefik) 

I am using labels for traefik to redirect requests to the coresponding 
containers (http://myhost/airflow -> airflow:8080) 

Issue is when trying to reach airflow (at http://myhost/airflow/) it gives me 
blank page while I am expecting ui to appear 


In the web console I Can see its accessing two resources

`Request URL
http://myhost/airflow/
Request Method
GET
Status Code
200 OK
Remote Address
10.247.254.55:80
Referrer Policy
strict-origin-when-cross-origin`
`Request URL
http://myhost/static/assets/index-Cvvtf_RA.js
Request Method
GET
Status Code
404 Not Found
Remote Address
10.247.254.55:80
Referrer Policy
strict-origin-when-cross-origin`


So I am not sure why its not serving all the files from the corect 
webserver_base_url or what I am doing wrong with this (there are already 
multiple other containers running without issues behind proxy (keycloak, 
postgres, pgadmin, redis, redis-commander, kafka, kafka-ui) all with almost the 
same configuration for proxy 
Its just airflow thats not able to work properly... 

docker service inspect airflow_webserver 

> [
>     {
>         "ID": "qqult0acktwa04cyw0s6qqrts",
>         "Version": {
>             "Index": 40491
>         },
>         "CreatedAt": "2025-07-24T09:34:31.815690295Z",
>         "UpdatedAt": "2025-07-24T10:10:03.339004262Z",
>         "Spec": {
>             "Name": "airflow_webserver",
>             "Labels": {
>                 "traefik.enable": "true",
>                 "traefik.http.routers.airflow-webserver-http.entrypoints": 
> "web",
>                 "traefik.http.routers.airflow-webserver-http.rule": 
> "Host(`myhost`) \u0026\u0026 PathPrefix(`/airflow`)",
>                 "traefik.http.routers.airflow-webserver-http.service": 
> "airflow-webserver",
>                 "traefik.http.routers.airflow-webserver-http.tls": "false",
>                 
> "traefik.http.services.airflow-webserver.loadbalancer.passhostheader": "true",
>                 
> "traefik.http.services.airflow-webserver.loadbalancer.server.port": "8080"
>             },
>             "TaskTemplate": {
>                 "ContainerSpec": {
>                     "Image": "apache/airflow:3.0.3",
>                     "Command": [
>                         "airflow",
>                         "api-server",
>                         "--proxy-headers"
>                     ],
>                     "Env": [
>                         "AIRFLOW_HOME=/opt/airflow",
>                         "AIRFLOW__CELERY__BROKER_URL=",
>                         "AIRFLOW__CELERY__RESULT_BACKEND=",
>                         "AIRFLOW__CORE__EXECUTOR=LocalExecutor",
>                         
> "AIRFLOW__CORE__FERNET_KEY=sz_MxfYCCa3-JpXOTMUwKrSyVjzCv5qz9JJHBfUvKhE=",
>                         
> "AIRFLOW__DATABASE__SQL_ALCHEMY_CONN=postgresql+psycopg2://airflow:airflow@postgres:5432/airflow",
>                         "AIRFLOW__WEBSERVER__BASE_URL=http://myhost/airflow";,
>                         "AIRFLOW__WEBSERVER__ENABLE_PROXY_FIX=True"
>                     ],


container output

> =================================================================
> INFO:     Uvicorn running on http://0.0.0.0:8080 (Press CTRL+C to quit)
> INFO:     Started parent process [1]
> INFO:     Started server process [9]
> INFO:     Waiting for application startup.
> INFO:     Application startup complete.
> INFO:     Started server process [11]
> INFO:     Waiting for application startup.
> INFO:     Application startup complete.
> INFO:     Started server process [10]
> INFO:     Waiting for application startup.
> INFO:     Application startup complete.
> INFO:     Started server process [12]
> INFO:     Waiting for application startup.
> INFO:     Application startup complete.
> INFO:     10.0.1.6:32828 - "GET /airflow/ HTTP/1.1" 200 OK
> INFO:     10.0.1.6:32828 - "GET /airflow HTTP/1.1" 200 OK

GitHub link: https://github.com/apache/airflow/discussions/53703

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: [email protected]

Reply via email to