Hi Sergei, You can also remove gunicorn completly and let Nginx talk to the Flask app directly using wsgi: https://www.digitalocean.com/community/tutorials/how-to-serve-flask-applications-with-uwsgi-and-nginx-on-ubuntu-14-04
I'm not super familiar with the routing in Nginx. A subdomain like airflow.domain.tld will work like Maxime suggested, but I'm not really sure if extending the path will work, e.g. domain.tld/airflow. Cheers, Fokko 2017-09-15 12:27 GMT+02:00 Sergei Iakhnin <[email protected]>: > I couldn't get the subdomain idea working for the use-case where a single > nginx proxies to multiple apps. For instance you want to have one front > page with links to Flower and Airflow Web UI. The quoble post was > interesting (thank you Sumit), but seemed a bit cumbersome. After some > searching I came upon the following gist, which uses the concept of WSGI > middleware to uniformly add a URL prefix across the entire Flask app: > > https://gist.github.com/Larivact/1ee3bad0e53b2e2c4e40 > > Implementing this in Airflow is extremely straightforward and does the job > nicely, all in a single place. > > Is there interest in having me PR this? > > Best, > > Sergei. > > > > > > On Thu, Sep 14, 2017 at 8:54 AM Sumit Maheshwari <[email protected]> > wrote: > > > Sergei, > > > > Check the first bullet/point on this blog > > <https://www.qubole.com/blog/creating-apache-airflow-as-a-service/>, it > > might help you. > > > > Thanks, > > Sumit Maheshwari > > cell. 9632202950 > > > > > > On Thu, Sep 14, 2017 at 2:34 AM, Maxime Beauchemin < > > [email protected]> wrote: > > > > > It works well if you use a subdomain instead of a folder. > > > > > > Max > > > > > > On Wed, Sep 13, 2017 at 1:05 PM, Sergei Iakhnin <[email protected]> > > wrote: > > > > > > > I'm wondering if the webserver can be run behind a reverse proxy like > > > > nginx. I've tried setting the base URL to have an additional context > > path > > > > of /airflow and then have nginx target that in the proxy_pass > > directive, > > > > but it hasn't worked. I would appreciate any other ideas. > > > > > > > > Without the context path the proxying of airflow clashes with other > > sites > > > > served by the proxy. > > > > > > > > Best, > > > > > > > > Sergei. > > > > -- > > > > > > > > Sergei > > > > > > > > > > -- > > Sergei >
