Welcome! Log In Create A New Profile

Advanced

Re: rewrite except one directory

Philipp Kraus
February 16, 2014 03:56PM
Hi,

Am 16.02.2014 um 21:38 schrieb Jim Ohlstein <jim@ohlste.in>:

> With a nested location, or, if all the contents of /home/www/content/scripts are PHP scripts, use a fastcgi_pass.
>
> Remember, all requests are handed by one location, and one location only. Writing instructions for how to handle PHP scripts in one location does not tell nginx how to handle them in other locations.

Thanks, imho my first PHP should be a "global" definition, but I see this is wrong. I'm using the nested version with

location ^~/scripts.
{
alias /home/www/content/scripts;
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
include /etc/nginx/fastcgi_params;
}
}

so imho all PHP scripts in my script location should be run, but at the moment I get also a download, the script is not passed to the PHP fast-cgi process. I call it
with http://myserver/scripts/myscript.php and myscript.php is downloaded

Thanks

Phil

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

rewrite except one directory

Philipp Kraus February 16, 2014 02:00AM

Re: rewrite except one directory

Francis Daly February 16, 2014 04:50AM

Re: rewrite except one directory

Philipp Kraus February 16, 2014 02:58PM

Re: rewrite except one directory

Jim Ohlstein February 16, 2014 03:40PM

Re: rewrite except one directory

Philipp Kraus February 16, 2014 03:56PM

Re: rewrite except one directory

Francis Daly February 16, 2014 04:46PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 47
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready