UNMS icon indicating copy to clipboard operation
UNMS copied to clipboard

Setting up SSL Cert: ERR_TOO_MANY_REDIRECTS

Open Joannou1 opened this issue 8 years ago • 5 comments

After first install, went to domain associated with IP, saw the setting up SSL cert page, then got the ERR_TOO_MANY_REDIRECTS. Browser doesn't matter, can only access via direct IP.

Using cloudflare as well.

Not sure if I'm missing something, was hoping I could access UNMS through a domain!

Joannou1 avatar Sep 21 '17 04:09 Joannou1

@Joannou1 we have not seen this before. The only redirect that UNMS does is from HTTP to HTTPS. It will redirect you to the port configured as --public-https-port if set, or --https-port if set, or 443. This could probably happen if your public https port was configured to the same as your http port. Can I see your /home/unms/app/unms.conf? Did you try opening UNMS using the domain and HTTPS?

jaroklima avatar Sep 21 '17 13:09 jaroklima

Sure, here's the config: https://hastebin.com/uhunapulul.ini

I did initially visit via the domain. I tried another installation where I initially visited via the IP, no difference. I've tried http and https variants on all sorts of browsers as well.

For testing purposes, I also disabled CloudFlare for the subdomain. No change. Using incognito mode on Chrome, I was able to get it working, only briefly though, very strange.

Joannou1 avatar Sep 22 '17 03:09 Joannou1

Actually, it is CloudFlare. It just takes a bit to see the changes take effect. image

Turning off the CDN for that subdomain fixes the problem oddly. I've also tried turning this off while on the CDN, but it doesn't help. image

Joannou1 avatar Sep 22 '17 04:09 Joannou1

Same/similar issue here. Debian 9.5 (Stretch), UNMS v0.12.2 Ports: 80, 443, 8444

When i disable the CDN from the Cloudflare dashboard, then unms.my-domain.com begins working properly from a Chrome incognito browser tab, however I'm still getting ERR_TOO_MANY_REDIRECTS from regular Chrome browser window. If i wait long enough (2-3+ minutes) then it redirects to UNMS dashboard, but shows "No devices in your network". I'm unable to search and add anything, either manually or using Discovery Manager. In order to get the devices to show up in UNMS, i need to use local IP address for UNMS key to paste into devices, as using unms.my-domain.com FQDN causes devices to drop capture

Also using the same feature "Always use HTTPS" listed above: capture2

peatrick avatar Aug 04 '18 21:08 peatrick

@peatrick Hello Pete. This looks like an issue with the CloudFlare configuration. The error occurs when CloudFlare communicates with UNMS through HTTP protocol. You can see similar symptoms when for example 'Flexible SSL' is turned on. It is necessary to configure your CloudFlare so that it communicates with UNMS via HTTPS protocol.

radekskrivan avatar Aug 14 '18 10:08 radekskrivan