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>
serverName sub.example.com
ProxyPass / http://127.0.0.1:8050
ProxyPassReverse / http://127.0.0.1:8050
ProxyRequests Off
<Proxy http://localhost:8050/*>
Order deny,allow
Allow from all
</Proxy>
</VirtualHost>
When I try to access http://sub.example.com 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://sub.example.com/_dash-layout [HTTP/1.1 502 Proxy Error 18ms] GET XHR http://sub.example.com/_dash-dependencies [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!
Edit:
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.
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!