Opened 10 years ago

Closed 9 years ago

#638 closed defect (worksforme)

nginx doesn't follow file symlinks on Windows 7

Reported by: Dan Dascalescu Owned by:
Priority: minor Milestone:
Component: nginx-core Version: 1.7.x
Keywords: Cc:
uname -a:
nginx -V: nginx version: nginx/1.7.6
TLS SNI support enabled
configure arguments: --with-cc=cl --builddir=objs.msvc8 --with-debug --prefix= --conf-path=conf/nginx.conf --pid-path=logs/ --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.35 --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-mail --with-openssl=objs.msvc8/lib/openssl-1.0.1i --with-openssl-opt=enable-tlsext --with-http_ssl_module --with-mail_ssl_module --with-ipv6


In my nginx root directory, I've created a symlink to an HTML file like this:

mklink foo.html "....\path\foo.html"

The symlink works in Windows 7 64-bit, NTFS.

But nginx appears to reads a zero-length content from the file, and returns a blank response body.

Change History (2)

comment:1 by Maxim Dounin, 10 years ago

Just tested on Windows 7 virtual machine (32-bit though), and symlinks works fine in nginx there. (In contrast, more command fails to properly open them, and this suggests there is something very wrong with symlinks on Windows.)

You may want to provide more details on how to reproduce the problem if you think the problem is in nginx. In particular, a minimal configuration to test with may be helpful, as well as a debug log. See for some hints.

It is also usually a good idea to look into error log, it may have something related.

comment:2 by Maxim Dounin, 9 years ago

Resolution: worksforme
Status: newclosed

Feedback timeout.

Note: See TracTickets for help on using tickets.