amanchaudhary-95 opened a new issue, #50191:
URL: https://github.com/apache/airflow/issues/50191

   ### Apache Airflow version
   
   3.0.0
   
   ### If "Other Airflow 2 version" selected, which one?
   
   _No response_
   
   ### What happened?
   
   Recently, I upgraded Airflow from 2.10 to 3.0. I've deployed Airflow behind 
Nginx. I was able to migrate successfully, except I'm getting `state mismatch` 
error if I'm setting `base_url` in `airflow.cfg`. 
   
   `airflow.cfg` setting:
   ```
   [api]
   base_url = http://localhost:8080/MLOps
   ```
    Nginx configuration:
   ```
   server {
       listen 80;
       server_name <server_name>;
       
   location /MLOps/ {
           proxy_pass http://localhost:8080;
           proxy_set_header X-Forwarded-Prefix /MLOps;
           proxy_set_header Host $host;
           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 $scheme;
       }
   }
   ```
   
   This was working fine in `Airflow 2.10` but right now I'm getting `state 
mismatch` if I'm trying to access the airflow web server using `http://<server 
IP>/MLOps` . Below is the screenshot.
   
   
![Image](https://github.com/user-attachments/assets/238762a6-c7f2-4677-965e-4f17e1e46490)
   
   Also, it is working fine if I disable `base_url` and access the airflow web 
server locally using `http://localhost:8080`. The same DAG is running 
successfully without any error but in that case, I'm not able to access the 
Airflow web server on `http://<server IP>/MLOps`. Below is the screenshot for 
the successful run:
   
   
![Image](https://github.com/user-attachments/assets/d147e5fb-415d-43bd-a199-90c64b9480a4)
   
   ### What you think should happen instead?
   
   _No response_
   
   ### How to reproduce
   
   Run any DAG with and without `base_url` behind nginx. Previously, it was 
working when `base_url` was under `[webserver]`
   
   ### Operating System
   
   Ubuntu server 24.04 LTS
   
   ### Versions of Apache Airflow Providers
   
   _No response_
   
   ### Deployment
   
   Virtualenv installation
   
   ### Deployment details
   
   Python 3.12.7
   
   ### Anything else?
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of 
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to