Reverse proxy setup instructions
Last updated
Last updated
The following instructions walk you through setting up an Nginx reverse proxy to establish an HTTP basic authentication layer before the application. These steps are specific to Ubuntu 18.04 but are generic enough to apply to other reverse proxies.
The above diagram outlines the server layout for running Dash Enterprise behind a reverse proxy. The reverse proxy receives requests from the client intended for the host, then passes authenticated requests to the authentication server (dashauth) listening on the internal IP used by Docker.
A typical request works as follows:
1 - The user's machine performs a DNS lookup for plotly.your.domain
and gets the IP address of the server
plotly.your-company.com
is the Base Domain Name configured in the server settings
2 - The user's machine connects to this IP via client and reaches the reverse proxy
3 - The reverse proxy then sends an authenticated request to plotly.your.domain
4 - The request is forwarded to the Dash Enterprise instance
Step 4 typically requires adding an entry to the /etc/hosts file on the host server to allow the reverse proxy’s request for plotly.your.company to be directed to the internal IP used by Docker. This is further discussed in Proxy Configuration.
Once Dash Enterprise has been installed, enable Local Proxy Mode as follows:
1 - Browse to the Dash Enterprise Server Manager Settings page
2 - Check Enable Docker Customizations
3 - Check Enable Local Proxy Mode
4 - Click Save at the bottom of the screen, then click Restart Now to apply your changes
5 - Browse to Dash Enterprise Server Manager and press "Stop Now" to stop Dash so we can have successful Nginx (reverse proxy) Install.
As a result of this change, Dash Enterprise will use Docker’s internal IP address, freeing up the host server’s IP address for use by the reverse proxy. The application will not respond to web requests until the reverse proxy is running.
After Dash Enterprise has been set to use Local Proxy Mode, install the proxy as follows:
1 - SSH into your server
2 - Install Nginx
Modify the configuration files associated with the web server to establish the authentication layer and reverse proxy, as follows.
1 - Replace the contents of the virtual host file /etc/nginx/sites-enabled/default
with the following, make sure to replace host_addr
with the internal IP of the host machine (typically named eth0 device), and replace server name
and the ssl_certificate
andssl_certificate_key
to match your scenario.
Confirm the IP address of your host server (the host_addr
parameter):
2 - Next, find the internal IP address used by Docker (docker0_addr):
3 - Edit /etc/hosts
to include an entry for the docker_addr that maps to the Base Domain and Streaming Domain associated with your Dash Enterprise instance:
Replace 172.17.0.1
with the docker0_addr
you discovered in Step 2
4 - Restart the Nginx service for the changes to take effect
5 - Browse to the Dash Server Manager and press "Start Now" to start Dash.
1 - SSH into your server and run the command below and follow the shell script wizard:
2 - Browse to the Domain URL you set and you should see an valid TLS/SSL cert now.