URLs with a url_base_pathname

A bit of progress here. Our CTO has got Chef/Nginx and uwsgi and we’ve got a Dash app in production. It needs url_base_pathname to be set in app=dash.Dash() - the setting in chef/nginx (e.g. /graphs/line) has to match url_base_pathname. All good.

The problem comes with the example above from @chriddyp using url / pathname. I.e. you can’t set url_base_pathname and the url / pathname attributes together. Any ideas if this is a bug, or an impossibility?

As an example, we want a url such as /graphs/ as our baseline, and then individual apps to descend off it. /graphs/app1 and /graphs/app2 to avoid having to spawn lots of Uwsgi processes

Cheers

Will

@will - You should be able to do this. I’m doing something very similar with the dash-docs: setting a url_base_pathname to be /dash/ and serving it through nginx with:

        location /dash/ {
                proxy_pass https://dash-docs.herokuapp.com/dash/;
        }

Thanks @chriddyp - think it may be a bug but not sure yet. For it to work, url/pathname attribute must include the url_base_pathname. Will update this thread with more.

Also see Deploy Dash on apache server [solved!] - I’ve added a couple of other config parameters

1 Like