[How To] install Nginx Reverse Proxy in CS with Let's Encrypt Certificate

User avatar
oyvindo
Experience counts
Posts: 1237
Joined: Tue May 19, 2009 2:08 am
Location: Norway, Oslo

Re: [How To] install Nginx Reverse Proxy in CS with Let's Encrypt Certificate

Post by oyvindo » Mon Mar 08, 2021 2:50 pm

Forwarding is something you do to an IP + a port, not to a folder.
ImageImageImageImage

tiagondelgado
Starting out
Posts: 16
Joined: Wed Oct 12, 2016 8:03 pm

Re: [How To] install Nginx Reverse Proxy in CS with Let's Encrypt Certificate

Post by tiagondelgado » Thu Mar 25, 2021 9:05 pm

hello, thanks its works!

I only have one problema, i cant access to my NAS outside of my network with https (http works), the erro is:"This site can’t be reached"

Image
Image


192.168.50.2:331 -> works
192.168.50.2:444 -> works (with ssl warning)
http://sub.mydomain.com -> works if i dont force ssl
https://sub.mydomain.com -> "This site can’t be reached"

What i do wrong?

User avatar
oyvindo
Experience counts
Posts: 1237
Joined: Tue May 19, 2009 2:08 am
Location: Norway, Oslo

Re: [How To] install Nginx Reverse Proxy in CS with Let's Encrypt Certificate

Post by oyvindo » Thu Mar 25, 2021 9:55 pm

Did you open port 443 in your router?
ImageImageImageImage

tiagondelgado
Starting out
Posts: 16
Joined: Wed Oct 12, 2016 8:03 pm

Re: [How To] install Nginx Reverse Proxy in CS with Let's Encrypt Certificate

Post by tiagondelgado » Thu Mar 25, 2021 11:26 pm

Yes, port 80, 8080 and 443 were already open and portfoward for qnap, at this moment I configured for Container> Ngnix proxy manager.

Image

Image

tiagondelgado
Starting out
Posts: 16
Joined: Wed Oct 12, 2016 8:03 pm

Re: [How To] install Nginx Reverse Proxy in CS with Let's Encrypt Certificate

Post by tiagondelgado » Fri Mar 26, 2021 12:39 am

I found the error, its the port 443 to 4443

User avatar
oyvindo
Experience counts
Posts: 1237
Joined: Tue May 19, 2009 2:08 am
Location: Norway, Oslo

Re: [How To] install Nginx Reverse Proxy in CS with Let's Encrypt Certificate

Post by oyvindo » Fri Mar 26, 2021 3:05 am

Whatever you do - NEVER - open port 8080 directly to your QNAP in order to access the QTS-Web-UI remotely.
ImageImageImageImage


User avatar
oyvindo
Experience counts
Posts: 1237
Joined: Tue May 19, 2009 2:08 am
Location: Norway, Oslo

Re: [How To] install Nginx Reverse Proxy in CS with Let's Encrypt Certificate

Post by oyvindo » Wed Mar 31, 2021 3:26 pm

192.168.50.2 is an internal NAT IP. Those will always work and has nothing to do with the RP.
XXX.XXXX.com is a DSN name. I cannot help you, except you must be the owner of XXX.XXXX.com and it must ha a DNS record pointing to your WAN-IP.But you should never add a port number to an internet URL.
ImageImageImageImage

tiagondelgado
Starting out
Posts: 16
Joined: Wed Oct 12, 2016 8:03 pm

Re: [How To] install Nginx Reverse Proxy in CS with Let's Encrypt Certificate

Post by tiagondelgado » Wed Mar 31, 2021 4:59 pm

The problem is qumagie adds a port to URL, the port 331 not open on router, its manager by nginx. how can remove qumagie puts port on URL when i click the app icon?

User avatar
oyvindo
Experience counts
Posts: 1237
Joined: Tue May 19, 2009 2:08 am
Location: Norway, Oslo

Re: [How To] install Nginx Reverse Proxy in CS with Let's Encrypt Certificate

Post by oyvindo » Wed Mar 31, 2021 5:18 pm

First of all, test it by manually typing the URL exactly as you want it - until you find a result that works on the external URL.
ImageImageImageImage


User avatar
oyvindo
Experience counts
Posts: 1237
Joined: Tue May 19, 2009 2:08 am
Location: Norway, Oslo

Re: [How To] install Nginx Reverse Proxy in CS with Let's Encrypt Certificate

Post by oyvindo » Thu Apr 01, 2021 2:51 am

You will probably find that
https://XXX.XXX.com/apps/qumagie
works just as well.

You should never add a port number to an external (internet) URL. If you do that, it will direct the call to port 331 on your WAN router. That's not what you want because that port is closed and should never be opened! Port forwarding is taken care of by your setting in the router as well as the RProxy.
ImageImageImageImage

boubi
Starting out
Posts: 25
Joined: Tue Oct 20, 2020 8:19 pm

Re: [How To] install Nginx Reverse Proxy in CS with Let's Encrypt Certificate

Post by boubi » Mon Apr 12, 2021 9:50 pm

Hi,

thank you for the guide.
I try to install it on my TS-128A and it's not running:
standard_init_linux.go:219: exec user process caused: exec format error.

is it a compatible error?
what nginx can I use for reverse proxy - I need just for use after vpn connect not from directly from the WAN.
I hope I will get a RPI soon, but still want to try it on Qnap

User avatar
oyvindo
Experience counts
Posts: 1237
Joined: Tue May 19, 2009 2:08 am
Location: Norway, Oslo

Re: [How To] install Nginx Reverse Proxy in CS with Let's Encrypt Certificate

Post by oyvindo » Mon Apr 12, 2021 11:39 pm

Hi,
your TS-128A is an underpowered End-Of-Line NAS based on the Realtek RTD1295 CPU, which is an ARM processor. You need a more powerful NAS with an ARM (Intel) processor to use these container images.
I don't know if Nginx ARM image exists. Perhaps it does.
ImageImageImageImage

boubi
Starting out
Posts: 25
Joined: Tue Oct 20, 2020 8:19 pm

Re: [How To] install Nginx Reverse Proxy in CS with Let's Encrypt Certificate

Post by boubi » Tue Apr 13, 2021 8:05 pm

Okay, thanks anyway.
I thought it would work because I have some containers working on this NAS.
I will wait for the RPI and run it through it.

Post Reply

Return to “Container Station”