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 Posted at Nginx Forum: https://forum.nginx.org/read.php?2,290968,290987#msg-290987 _______________________________________________ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx