[HOW TO] install Nginx Reverse Proxy in CS with Let's Encrypt Certificate

Post Reply
User avatar
oyvindo
Experience counts
Posts: 1399
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 »

Forwarding is something you do to an IP + a port, not to a folder.
ImageImageImage
tiagondelgado
Starting out
Posts: 19
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 »

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: 1399
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 »

Did you open port 443 in your router?
ImageImageImage
tiagondelgado
Starting out
Posts: 19
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 »

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: 19
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 »

I found the error, its the port 443 to 4443
User avatar
oyvindo
Experience counts
Posts: 1399
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 »

Whatever you do - NEVER - open port 8080 directly to your QNAP in order to access the QTS-Web-UI remotely.
ImageImageImage
User avatar
oyvindo
Experience counts
Posts: 1399
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 »

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.
ImageImageImage
tiagondelgado
Starting out
Posts: 19
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 »

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: 1399
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 »

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.
ImageImageImage
User avatar
oyvindo
Experience counts
Posts: 1399
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 »

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.
ImageImageImage
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 »

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: 1399
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 »

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.
ImageImageImage
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 »

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”