Opened 13 years ago

Closed 13 years ago

#4 closed defect (invalid)

Bug with relative paths

Reported by: l-ll-l-l-ll-lll.myopenid.com Owned by: somebody
Priority: minor Milestone:
Component: nginx-core Version: 1.0.x
Keywords: Cc:
uname -a:
nginx -V: nginx: nginx version: nginx/1.0.4
nginx: TLS SNI support enabled
nginx: configure arguments: --builddir=objs.msvc8 --crossbuild=win32 --with-debug --prefix= --conf-path=conf/nginx.conf --pid-path=logs/nginx.pid --http-log-pat
h=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_tem
p --http-fastcgi-temp-path=temp/fastcgi_temp --with-cc-opt=-DFD_SETSIZE=1024 --with-pcre=objs.msvc8/lib/pcre-7.9 --with-zlib=objs.msvc8/lib/zlib-1.2.3 --with-se
lect_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_m
odule --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-mail --with-ipv6 --with-openssl=objs.msvc8/lib/openss
l-0.9.8r --with-openssl-opt=enable-tlsext --with-http_ssl_module --with-mail_ssl_module

Description

I cannot get nginx and php to work with relative paths in some configurations on windows.
E.g. I have
D:\WebSite
with
D:\WebSite\html
D:\WebSite\php536
D:\WebSite\nginx
D:\WebSite\nginx\html

my config for php is
location ~ .php$
{
include fastcgi_params;
fastcgi_index index.php;
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME '$document_root$fastcgi_script_name';
}

when I set root to
root html;
everything is working and I can use the html folder within the nginx folder.
But when I want to use
D:\WebSite\html
and set root to
root ../html;
All static files are working. But php cannot find the files.
When I use
root 'd:/WebSite/html';
everything is working also but this is not portable. Any hints how I can solve this
except use "root html;"? That's not the folder structure I want.

Thanks

Change History (1)

comment:1 by Maxim Dounin, 13 years ago

Resolution: invalid
Status: newclosed

Please use mailing list for questions instead.

Note: See TracTickets for help on using tickets.