rewrite except one directory

Philipp Kraus philipp.kraus at tu-clausthal.de
Sun Feb 16 19:57:47 UTC 2014


Hi

thanks for your answer, seems to be working

> ==
> location ^~ /scripts/ {
> # do your /scripts/ stuff
> }
> location / {
> # do everything else
> }
> ==


I have defined my script location with:

    location ~ \.php$ {
        fastcgi_pass   127.0.0.1:9000;
        include /etc/nginx/fastcgi_params;
    }

    location ^~/scripts
    {
        alias /home/www/content/scripts;
    }

but in my alias path there are stored PHP scripts and at the moment
I get a download of the script but the script is not pushed to the fast-cgi
process. How can I enabled in the script location the PHP CGI for *.php
files?

Thanks

Phil




More information about the nginx mailing list