I have a dash app running on a docker container. I am running the container at port 8050 and I want to run it through https. I have already configured https and other containers (e.g., grafana) are working correctly, without issues.
For the dash app, let’s call it DASH, it is running well with HTTP. but when it comes to https (domain_name.com/DASH/, the login pop up is working perfectly, but the layout is stuck at loading, and for example with inspect function in the browser, https://domain_name.com/_dash-component-suites/dash/dash_table/bundle.v5_2_11m1719340598.js gives 404 not found. Any idea what to do to fix all that? or if I am missing some step?
I am surprised that it works for http://domain_name.com/dash/ and not https://domain_name.com/dash/
In the URL https://domain_name.com/_dash-component-suites/dash/dash_table/bundle.v5_2_11m1719340598.js what’s certainly missing is the dash/ prefix . i.e. can you try if https://domain_name.com/dash/_dash-component-suites/dash/dash_table/bundle.v5_2_11m1719340598.js reachable ?
I mean , to me, it is not supposed to work either in HTTP. Using a sub domain seems more appropriate.
From what I understood, if you access directly through http://domain_name.com:8050 you are bypassing nginx and directly accessing the Dash server that is listening on port 8050.
If you expect this server to be accessible at http://domain_name.com/dash/, I don’t think it will work (http or https), because I would not be surprised that dash always refer to the root path “/”.
For example, even if you access to http://domain_name.com/dash/ successfully, Dash will make an HTTP request like http://domain_name.com/_dash-layout to initialize your app, and similar other HTTP requests for every callbacks.
I am not sure if there is an option in Dash to specify that it should request /dash/_dash-layout instead of /_dash-layout
Maybe the route definition, as suggested @jinnyzor like url_base_pathname, requests_pathname_prefix , routes_pathname_prefix from API Reference | Dash for Python Documentation | Plotly
Side note : I think using a subdomain like dash.domain_name.com for this is just less trouble.