Welcome! Log In Create A New Profile

Advanced

nginx and php portable

nginx and php portable
June 13, 2011 06:09AM
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
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 208
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