**HELP Blank redirect page after being Proxied reddit / selfhosted ---------------------------------------------------------------------- fastandloud386 · 2023-10-21 05:08 I apologies in advanced this is my first time using a proxy and I have a general idea of how they work but the breakdown is I want to be able to access my NextCloud instance from the internet securely and without having to use a vpn. **Things i have done:** 1. I have my Nextcloud instance running on my Truenas Scale system as Kubernete and its accessible by (192.168.X.X:4545) 2. I have my Nginx Proxy Manger running as a docker on a Ubuntu machine and its accesible by (192.168.x.x:MGMT port) It is also using ports 443 and 80 for HTTPS and HTTP. I have generated an API key in Cloudflare for my SSL Certificate for Nginx and have added it for my domain of ([anydomain.com](https://anydomain.com)) and ([brkfestclb.anydomain.com](https://brkfestclb.anydomain.com)) for the proxy host i have the source as [brkfestclb.anydomain.com](https://brkfestclb.anydomain.com) destined for [https://192.168.x.x:4545](https://192.168.x.x:4545) **Under Details Common Exploits is turned on,** ***Under SSL-*** **Force SSL, HTTP/2 Support and HSTS is turned on** 3. In Cloudflare I have my A record pointing towards my public Ip and it is set to Proxy. 4. On the Unifi Dream Machine I have my Nginx Proxy being port forwarded on ports 80 and 443 5. When i go to [brkfestclb.anydomain.com](https://brkfestclb.anydomain.com) it redirects me to [https://192.168.x.x:4545](https://192.168.x.x:4545) as intended **Issues** 1. When I go to my site it redirects me just fine but nothing happens its blank screen i can see that it redirects me to the correct URL at [brkfestclb.anydomain.com](https://brkfestclb.anydomain.com) \> [https://192.168.x.x:4343/login](https://192.168.x.x:4343/login) any ideas what the cause could be? ​ **Questions** 1. Would this be a best practice approach of making this secure as possible while being accesible by the internet? 2. If you have an additional suggestions I am open ears. **Resources** these are the videos that I have watched [https://youtu.be/GarMdDTAZJo?si=kXgeqdZDy9Spjp59](https://youtu.be/Ga rMdDTAZJo?si=kXgeqdZDy9Spjp59) [https://youtu.be/iFHbzWhKfuU?si=mLuz1xgflz\_MmR2d](https://youtu.be/i FHbzWhKfuU?si=mLuz1xgflz_MmR2d) ​ ---------------------------------------------------------------------- [deleted] · 2023-10-21 05:20 [removed] ---------------------------------------------------------------------- BinaryPatrickDev · 2023-10-21 05:29 That 192 address is in your private IP space. A redirect there won’t work from outside your network. The external DNS entry should point to your public IP and your router needs to port forward the request to nginx ---------------------------------------------------------------------- geo38 · 2023-10-21 05:30 > I have my Nextcloud instance running on my Truenas Scale system as Kubernete and its accessible by (192.168.X.X:4545) You left out a stunningly crucial piece of information. Accessible via http:// or https:// \#5 has: > it redirects me to https://192.168.x.x:4545 as intended But #1 has: > can see that it redirects me to the correct URL at brkfestclb.anydomain.com > https://192.168.x.x:4343/login an How can https://192.168.x.x:4545 'be as intended' but yet the very next item says the 'correct URL' is https://192.168.x.x:4343/login I'm so confused about 4545 vs 4343? Finally, is your local nextcloud HTTP or HTTPS? If HTTP, then your redirect URL needs to be http:// You wrote: > When i go to brkfestclb.anydomain.com again, a stunningly incredibly important piece of information is being left out -- HTTP or HTTPS? if you just put a domain, you're at the mercy of your web browser. Normally that's OK, and most browsers try https first, but until you get your proxy figured out, *FORCE THE BROWSER* by specifying http://brkfestclb.anydomain.com or https://brkfestclb.anydomain.com. You probably want to configure the proxy to redirect http: to https: but until you get that working, your debugging will be more productive if you fully spell out URLs including http:// or https:// so that you know what's happening. ---------------------------------------------------------------------- BinaryPatrickDev · 2023-10-21 05:37 That 192 address is not your public address. Are you sure the A record is pointing to your public IP address? ---------------------------------------------------------------------- fastandloud386 · 2023-10-21 16:20 My apologies, I was inconsistent on the port numbers that i gave when i was refereeing to my Next Cloud instance url. The port number was just an example port. The first port i was referring to should be still be 4545 and not 4343 For the nextcloud instance url. If go to [http://192.168.x.x](http://192.168.x.x):PORT it gives me 400 a bad request. If I do the same thing but use https it takes me to the landing page the same thing occurs if i just simply type the ip address followed by the port it still takes me to the landing page. If i try to go to [https://brkfestclb.anydomain.com](https://brkfestclb.anydomain.com) it still redirects me to the [https://192.168.x.x](https://192.168.x.x):PORT Im accessing these pages internally within my network. In all senarios that I have tried it gives me NET::ERR\_CERT\_COMMON\_NAME\_INVALID before clicking on proceed "Proceed anyways" If try to access it outside of my network and go to my subdomain https://brkfestclb.anydomain.com it redirects me to [https://192.168.x.x](https://192.168.x.x):Port/login nothing happens it just times out Going to [ssllabs.com](https://ssllabs.com) and testing my domain gives me all B's on the servers I hope this can clear up some confusion from my initial post. Thank you ---------------------------------------------------------------------- fastandloud386 · 2023-10-21 16:28 Yes i am confident my A record is pointing to my public ip. in cloudflare for the content i have my public ip and for proxy status i have it set for proxied. ---------------------------------------------------------------------- BinaryPatrickDev · 2023-10-21 16:39 Is your nginx proxy set to redirect or proxy ---------------------------------------------------------------------- fastandloud386 · 2023-10-21 18:22 it's set as a proxy host