Deploy Dash on apache server [solved!]

This should be the url_base_pathname. Additionally, I have added two additional config properties:

  • routes_pathname_prefix - This adds a prefix to the name of the backend routes that the server expects. This is initialized to url_base_pathname
  • requests_pathname_prefix - This adds a prefix to the API calls that are made by the Dash front-end to the server. This is initialized to url_base_pathname

So, if your app is served under /my-proxy/ but your proxy server removes the /my-proxy/ prefix before forwarding the request to the underlying dash server, you can set

app.config.update({
    # as the proxy server will remove the prefix
    'routes_pathname_prefix': '/', 

    # the front-end will prefix this string to the requests
    # that are made to the proxy server
    'requests_pathname_prefix': '/my-proxy/'
})

However, if your proxy server does not remove this prefix before forwarding the requests, you can just set both of these variables to the same prefix.

These variables are new, so you’ll need to upgrade to the latest dash and dash-renderer:

pip install dash==0.18.3
pip install dash-renderer==0.9.0
2 Likes