Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.
Use Nginx with mango as an SSL reverse proxy
-
NOTE: This assumes you can reach the mango box by port 80 and 443
Otherwise a DNS challenge approach will be needed
- Inside mango env.properties file, ensure you have:
- Set this to true if you are running Mango behind a reverse proxy that sends "Forwarded" or "X-Forwarded-*" headers.
- This includes accessing Mango via Cloud Connect module. By default only requests from localhost are trusted.
web.forwardedHeaders.enabled=true
- Set a comma separated list of IP ranges from which to trust Forwarded headers
web.forwardedHeaders.trustedIpRanges=127.0.0.0/8,::1
- Assuming you have nginx installed and certbot along with certbot nginx support.
copy and rename the "your.website.com script below" file into
/etc/nginx/sites-available/
Open the file with nano and replace the instances of your.website.com with the actual domain name you are using (this file assumes you are running mango on port 8080!) - cd into sites-enabled:
cd ../sites-enabled - as root, create a soft link with:
ln -s ../sites-available/your.website.com - restart nginx, you should then be able to access the website with straight http
- run certbot --nginx
- fill in credentials, at the option for https redirection, select 2
- press enter
- profit
server { #your.website.com/ server_name your.website.com; root /opt/mango/overrides/web/; index index.html; location / { proxy_pass http://127.0.0.1:8080/; proxy_http_version 1.1; # Inform Mango about the real host, port and protocol proxy_set_header X-Forwarded-Host $host:$server_port; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; } listen 80; }
Fox
-
M MattFox referenced this topic on
-
@MattFox Hi Matt, Thank you for your post. I haven't tried your post yet but I already something similar. Could you try:
Step 1: create a <ma-point-value> with enable-popup="left" (can be right or any direction).
Step 2: click on the popup and see the chart.Mine didn't have chart shown up if I connect with my domain, but still work if connect with IP. I use VPS with public IP.
-
@tungthanh500 sounds websocket related, can you look at the console and see what errors appear when you try to do the steps you mentioned before?
Fox
-
M MattFox referenced this topic on