The problem is happening from the airflow code, where we are calling
*url_for('static',
..)* at many places. If we can somehow override *url_for* method and return
the desired path (/airflow-host-id/static in this case), then the problem
could be solved.I did some googling to find out *overirder_url_for* method, but couldn't find a working model yet. http://flask.pocoo.org/snippets/40/ http://stackoverflow.com/questions/9513072/more-than-one-static-path-in-local-flask-instance http://stackoverflow.com/questions/25412636/how-can-i-override-the-static-file-handler-in-flask Thanks, Sumit On Wed, Jul 6, 2016 at 2:29 AM, Yogesh Garg <[email protected]> wrote: > Hi, > > We are also trying to setup airflow behind nginx reverse proxy. Here is our > use case: > > We've multiple airflow setups running for different end users. We want that > this setup to be accessed in following fashion: > > *https://example.com/airflow-host-id/admin/ > <https://example.com/airflow-host-id/admin/>..* > > Where example.com is our common domain name and airflow-host-id is unique > for each end user. We've setup a nginx proxy in front, which identifies by > looking at airflow-host-id where to redirect that url. > > As suggested by Bolke, I changed static_url_path to /airflow-host-id/admin/ > but that did not work out alone for our use case. I think we might have to > change url, endpoint as well. Can someone suggest what changes would be > needed for our use case. I would be happy to raise a PR for the same if it > works out! > > Thanks. > > > On Tue, Jul 5, 2016 at 12:22 PM, Bolke de Bruin <[email protected]> wrote: > > > As discussed on gitter, we currently don’t expose static_url_path to the > > config so you either need to > > > > 1) adjust app.py to take static_url_path into account (PR welcome!) > > 2) put an extra nginx in front of airflow that does an extra reverse > proxy > > for you (ie. translates /xxx to /static) > > > > Bolke > > > > > Op 3 jul. 2016, om 11:56 heeft scorpio 2005 > > <[email protected]> het volgende geschreven: > > > > > > Hi, > > > Can you please help to fix the issue? > > > > > > On Wednesday, June 29, 2016 10:16 AM, scorpio 2005 > > <[email protected]> wrote: > > > > > > > > > > > > > > > > > > > > > Hi, > > > we are trying to do a nginx reverse proxy to airflow, but due to the > > multi mix of docker apps, we are ending up by requiring proxy URL to > > /static (for css , html, and js files). So in airflow, we intend to add a > > suffix url to /static files, so that it can be uniquely identified by > > nginx. for example(http://example.com/airflow/static). > > > > > > Is any specific configuration using [/static]. If so, how to change it. > > Highly appreciated if anybody can help to sort out this issue? > > > > > > Regards,Cool Pilot > > > > > > > > > > > > > >
