Solved reverse proxies to access docker apps (nginx?)

Currently reading
Solved reverse proxies to access docker apps (nginx?)

284
29
NAS
DS1019+ DSM6
Operating system
  1. Windows
Mobile operating system
  1. iOS
i tested every sub-domain and they all do the same.
i did add that htaccess file but that doesn't seem to have worked for the default site.

does HSTS require a certain browser capability to work?
 
284
29
NAS
DS1019+ DSM6
Operating system
  1. Windows
Mobile operating system
  1. iOS
re-checked settings for each sub-domain, rebooted the NAS.
still same result.

loaded EDGE, http://test.blah.com and it loaded the HTTP site - did not forward to HTTPS
 
284
29
NAS
DS1019+ DSM6
Operating system
  1. Windows
Mobile operating system
  1. iOS
so as it stand right now this is what is happening

all HTTPS sites load fine
all HTTP sites are loading the default web station home page. they are all being forwarded to that rather than to their HTTPS equivalent.

i don't want a port 80 HTTP to fail though, i want it to the redirected to the HTTPS equivalent.
 
284
29
NAS
DS1019+ DSM6
Operating system
  1. Windows
Mobile operating system
  1. iOS
just tested this on a completely different computer and HTTP is not being forward to HTTPS.

all HTTPS sites load fine
all HTTP sites are loading the default web station home page. they are all being forwarded to that rather than to their HTTPS equivalent.
 

fredbert

Moderator
NAS Support
Subscriber
4,076
1,616
NAS
DS1520+, DS218+, DS215j
Router
  1. RT2600ac
  2. MR2200ac
  3. RT6600ax
Operating system
  1. macOS
Mobile operating system
  1. iOS
At a loss to know why it's not working for you then. You have also got HSTS enabled in Control Panel / Network / DSM Settings? It's the box labelled 'Automatically redirect HTTP connections to HTTPS...'.
 
284
29
NAS
DS1019+ DSM6
Operating system
  1. Windows
Mobile operating system
  1. iOS
i didn't, but have i now enabled it and the end result is the same.

HTTPS sites load correctly.
HTTP sites are loading the default web station website (ie they are not even loading HTTP version of the correct site).
 

fredbert

Moderator
NAS Support
Subscriber
4,076
1,616
NAS
DS1520+, DS218+, DS215j
Router
  1. RT2600ac
  2. MR2200ac
  3. RT6600ax
Operating system
  1. macOS
Mobile operating system
  1. iOS
It really sounds like there's a misconfiguration under the hood within the rewriting rules of DSM. You can open a support ticket with Synology and they will probably ask for remote access to the NAS to investigate it.

If you disable HSTS for one/all application URLs does it still go to Web Station home page?
 
284
29
NAS
DS1019+ DSM6
Operating system
  1. Windows
Mobile operating system
  1. iOS
i've just tested with HSTS enabled and disabled and it still gives the same end result.
HTTPS loads fine, HTTP loads the default web station site.

this is what the reverse proxy settings look like for the site in question

Capture.JPG
 
284
29
NAS
DS1019+ DSM6
Operating system
  1. Windows
Mobile operating system
  1. iOS
just a thought, is the HTTP version routing to default site because there is nor reverse proxy set up for HTTP version of the site i'm trying to access?

would i need to create one for both HTTP and HTTPS?
 
284
29
NAS
DS1019+ DSM6
Operating system
  1. Windows
Mobile operating system
  1. iOS
so this one is still an issue for me.
the only browser that auto re-directs to HTTPS seems to be Google Chrome.
every other browser i've tested with lets you load the HTTP version if that's the URL you enter (Old Edge, New Edge, Opera, FIrefox).
 
284
29
NAS
DS1019+ DSM6
Operating system
  1. Windows
Mobile operating system
  1. iOS
actually, just tested chrome incognito mode and that also doesn't forward, so i'm guessing that chrome has just cached the fact that the HTTPS forward worked on previous hosting.

so HTTPS-to-HTTP autoforward is not working at all
 

fredbert

Moderator
NAS Support
Subscriber
4,076
1,616
NAS
DS1520+, DS218+, DS215j
Router
  1. RT2600ac
  2. MR2200ac
  3. RT6600ax
Operating system
  1. macOS
Mobile operating system
  1. iOS
What can I say? From the Internet, I tested Firefox using an undefined subdomain of my domain that point wildcard to my ISP IP. Using http://test.mydomain.com and the NAS does redirect it to https://test.mydomain.com

I run a local DNS server for my home domain and Internet DNS service for outside. Whether resolving from LAN or Internet I get redirected to HTTPS for all my applications and virtual hosts.

Using Safari, mainly, or Firefox.
 
284
29
NAS
DS1019+ DSM6
Operating system
  1. Windows
Mobile operating system
  1. iOS
the only difference is you're using apache rather than nginx as the back-end?
what was your step-by-step process ? maybe i've missed something.
 
284
29
NAS
DS1019+ DSM6
Operating system
  1. Windows
Mobile operating system
  1. iOS
Last edited:
update - looks like it might be an nginx problem.
just changed the back-end to apache 2.4 and now it's autoredirecting to HTTPS.

the custom 404 error page (missing.html) also didn't work when using nginx, but works in apache.
 
284
29
NAS
DS1019+ DSM6
Operating system
  1. Windows
Mobile operating system
  1. iOS
makes you wonder what's wrong with nginx, maybe it's not writing the changes to nginx.conf or something.
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Similar threads

  • Question
sorry for the late reply but if your domain is being proxied by CF and the logs are stating script...
Replies
10
Views
2,045
I m feeling stupid !!! How the hell I have not seen thisS !!! Excuse meEE !!! All works like a charm now !
Replies
10
Views
9,385
  • Question
Aah, that's it. Thank you so much. I had been looking at the three dots at the top right nit the correct...
Replies
4
Views
2,392
Hi, you need to use a SRV record in the dns zone for your domain name, with this you can add ports to A...
Replies
26
Views
1,155
  • Solved
Is there any recommendations on whether to leave record file access time off, daily, or monthly? I turned...
Replies
7
Views
2,327
If you set a different network and assign a port to it I don't see why the firewall will not allow you to...
Replies
1
Views
947

Welcome to SynoForum.com!

SynoForum.com is an unofficial Synology forum for NAS owners and enthusiasts.

Registration is free, easy and fast!

Trending threads

Top