Black Lives Matter. Please consider donating to Black Girls Code today.
Learn how to use COVID-19 data in open source Dash apps. Register for the Sept 23rd webinar with IQT!

502 Proxy Error with Dash

Dear all,

I am trying to deploy a Dash application that is running smoothly locally. To do so, I installed and configured Python3 on the server side, clone my code there, and configured Apache with the following:

<VirtualHost *:80>

    ProxyPass        /
    ProxyPassReverse /
    ProxyRequests Off

    <Proxy http://localhost:8050/*>
           Order deny,allow
           Allow from all

When I try to access I get an Error loading layout. I cannot see nothing more (no message, nothing) in my console. If I take a look on the dev console on my browser, I get the following errors:

GET XHR [HTTP/1.1 502 Proxy Error 18ms]
GET XHR [HTTP/1.1 502 Proxy Error 18ms]

I have no idea (and found no inspiration online) of what I could do to circumvent this issue. I suspect it has something to do with my Apache configuration, but that’s it.

Any help or hint would be appreciated!

I found some potential hints on this post but I am not sure to understand how to apply this to my case.

Are you able to check the request logs of the actual Apache requests? This looks like an error on the proxy side rather than the Dash side, but we may be able to learn something from looking at what the requests look like before they reach Dash.

Also, see for some instructions on using apache with flask. I don’t have any experience with this personally.

Thanks for helping! I can access the log and get the following:

[Mon Oct 16 16:59:52.821276 2017] [proxy:error] [pid 6193] [client] AH00898: DNS lookup failure for: returned by /_dash-layout, referer:

It is definitely a problem on the proxy/server side rather than a Dash one, I’ll have a look on the material you provide on Flask.

It looks like there is a missing / here, it should be What if you changed your settings to be

    ProxyPass        /
    ProxyPassReverse /


Indeed… I had other problems previously and edited these two lines to remove the trailing slash according to something else I found. It works now like a charm, thanks!

1 Like