Welcome! Log In Create A New Profile

Advanced

Re: Works only in root..

March 15, 2021 07:11AM
I'm trying to hide my QNAP NAS behind NGINX... without success.

With more attention I discover that with

server {
listen 80;
listen [::]:80;

access_log /var/log/nginx/reverse-access.log;
error_log /var/log/nginx/reverse-error.log;

location /qnap{
proxy_pass https://192.168.1.10;
}
}

when I ask browser to visit: NGINX_IP\qnap something good happens.
In fact, I read the correct webpage name and I discover that the error page is not from NGINX but from QNAP.

It seems that NGINX does not have success to get some of the resource behind my qnap NAS. Is this possible? If yes, why ?
Why all works perfectly when, in .conf, if I change:
- location /qnap{
with
- location / {

?

Error log shows:
[error] 1722#1722: *74 open() "usr/share/nginx/html/cgi-bin/images/error/logo_gray.png failed (2: no such file or directory), client 192.168.xx.xx, server: , request: "GET /gci-bin/images/error/logo_gray.png HTTP/1.1 host: 192.168.xx.NGINX_address, referrer "http://192.168.xx.NGINX_address/qnap"

I have two questions:
- does NGINX make a local copy of remote resource before building page ? If yes I understand why it try to open a local folder (usr/share/nginx/html/cgi-bin/images/error/logo_gray.png) But, this folder (that corresponds to the address of target) is obviously empty.
- is it possible that target does not answer to NGINX ? Why? Should I change something in .conf?

>While I'm here could you guide me - is there any specific reason to
>use a back slash instead of a very common forward slash?
Whith '/' all things seems to work..

Thanks
Subject Author Posted

Works only in root..

bubugian March 13, 2021 04:52PM

Re: Works only in root..

Sergey A. Osokin March 14, 2021 12:00AM

Re: Works only in root..

bubugian March 15, 2021 07:11AM

Re: Works only in root..

Francis Daly March 15, 2021 01:46PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 168
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready