Opened 8 years ago

Closed 8 years ago

#1045 closed defect (invalid)

sub_filter not able to create directories (or files) on windows 7

Reported by: dffuller@… Owned by:
Priority: minor Milestone:
Component: other Version: 1.9.x
Keywords: Cc:
uname -a: MINGW32_NT-6.1 E450-HVY-05 1.0.12(0.46/3/2) 2012-07-05 14:56 i686 unknown
nginx -V: nginx version: nginx/1.11.3
built by cl 16.00.30319.01 for 80x86
built with OpenSSL 1.0.2h 3 May 2016
TLS SNI support enabled
configure arguments: --with-cc=cl --builddir=objs.msvc8 --with-debug --prefix= --conf-path=conf/nginx.conf --pid-path=logs/nginx.pid --http-log-path=logs/access.log --error-log-path=logs/error.log --sbin-path=nginx.exe --http-client-body-temp-path=temp/client_body_temp --http-proxy-temp-path=temp/proxy_temp --http-fastcgi-temp-path=temp/fastcgi_temp --http-scgi-temp-path=temp/scgi_temp --http-uwsgi-temp-path=temp/uwsgi_temp --with-cc-opt=-DFD_SETSIZE=1024 --with-pcre=objs.msvc8/lib/pcre-8.39 --with-zlib=objs.msvc8/lib/zlib-1.2.8 --with-select_module --with-http_realip_module --with-http_addition_module --with-http_sub_module --with-http_dav_module --with-http_stub_status_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_auth_request_module --with-http_random_index_module --with-http_secure_link_module --with-http_slice_module --with-mail --with-stream --with-openssl=objs.msvc8/lib/openssl-1.0.2h --with-openssl-opt=no-asm --with-http_ssl_module --with-mail_ssl_module --with-stream_ssl_module --with-ipv6

Description

Attempting to reverse proxy Jupyter via nginx, for what it's worth.

I ended up creating a couple of directories that sub_filter was trying to create, but then it appears to be unable to create the files, either.

Is this related to the bug that was fixed in 1.9.13?

Location config:

location /jupyter {

rewrite /jupyter(.*) $1 break;
proxy_pass http://localhost:8888;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Origin "";
proxy_set_header Accept-Encoding "";
sub_filter 'h' 'H';
sub_filter 'title' 'TITLE';
sub_filter 'href="/' 'href="http://localhost:8888/';
sub_filter 'src="/' 'src="http://localhost:8888/';
sub_filter_once on;
sub_filter_types *;
#proxy_redirect off;
proxy_set_header Host $host;

}

Errors:
2016/08/05 15:09:20 [error] 2676#11580: *12 CreateFile() "C:\dev\nginx-1.11.3/html/static/components/es6-promise/promise.min.js" failed (3: The system cannot find the path specified), client: 127.0.0.1, server: localhost, request: "GET /static/components/es6-promise/promise.min.js?v=f004a16cb856e0ff11781d01ec5ca8fe HTTP/1.1", host: "localhost", referrer: "http://localhost/jupyter/tree"
2016/08/05 15:09:20 [error] 2676#11580: *14 CreateFile() "C:\dev\nginx-1.11.3/html/static/components/requirejs/require.js" failed (3: The system cannot find the path specified), client: 127.0.0.1, server: localhost, request: "GET /static/components/requirejs/require.js?v=6da8be361b9ee26c5e721e76c6d4afce HTTP/1.1", host: "localhost", referrer: "http://localhost/jupyter/tree"
2016/08/05 15:09:20 [error] 2676#11580: *14 CreateFile() "C:\dev\nginx-1.11.3/html/static/tree/js/main.min.js" failed (2: The system cannot find the file specified), client: 127.0.0.1, server: localhost, request: "GET /static/tree/js/main.min.js?v=cee9d5ded70fc8733bb888581c22f633 HTTP/1.1", host: "localhost", referrer: "http://localhost/jupyter/tree"
2016/08/05 15:09:20 [error] 2676#11580: *14 CreateFile() "C:\dev\nginx-1.11.3/html/static/base/images/logo.png" failed (3: The system cannot find the path specified), client: 127.0.0.1, server: localhost, request: "GET /static/base/images/logo.png?v=7c4597ba713d804995e8f8dad448a397 HTTP/1.1", host: "localhost", referrer: "http://localhost/jupyter/tree"
2016/08/05 15:09:20 [error] 2676#11580: *14 CreateFile() "C:\dev\nginx-1.11.3/html/static/tree/js/main.min.js" failed (2: The system cannot find the file specified), client: 127.0.0.1, server: localhost, request: "GET /static/tree/js/main.min.js?v=cee9d5ded70fc8733bb888581c22f633 HTTP/1.1", host: "localhost", referrer: "http://localhost/jupyter/tree"

Change History (1)

comment:1 by Maxim Dounin, 8 years ago

Resolution: invalid
Status: newclosed

The sub_filter directive doesn't try to create anything. The CreateFile() function is used to open files on Windows, and the errors you've quoted indicate that files cannot be found for requests in question.

It doesn't looks like a bug in nginx, so I'm closing this ticket. If you need help, please consider asking in the mailing list instead.

Note: See TracTickets for help on using tickets.