Static files download

Edho P Arief edhoprima at gmail.com
Thu Jun 10 17:23:03 MSD 2010


On Thu, Jun 10, 2010 at 8:09 PM, Axel <junk at devignon.fr> wrote:
> Igor,
>
> I'm trying to follow your advise but look:
>
>
>        # ROUTING TO KOHANA IF REQUIRED
>        location / {
>                try_files $uri $uri/ @kohana;
>        }
>
>        # HANDLES THE REWRITTEN URLS TO KOHANA CONTROLLER
>        location @kohana
>        {
>                fastcgi_pass 127.0.0.1:9000;
>                fastcgi_index index.php;
>                include fastcgi_params;
>                include hom_params;
>                fastcgi_param SCRIPT_FILENAME $document_root/index.php;
>        }
>
>        # FOR PHP FILES NOT HANDLED BY KOHANA
>        location ~* \.php$ {
>                fastcgi_pass 127.0.0.1:9000;
>                fastcgi_index index.php;
>                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
>                include fastcgi_params;
>                include hom_params;
>        }
>
>
> Nearly everything works at this stage EXCEPT:
>
> when I browse an URL like "http://www.xxxx.com/share.php", this file (share.php) does not exist in the document root therefore this URL should be handled by @kohana.
> As an answer, I get a "No input file specified". I'm pretty sure the .php location is taking over @kohana. I tried to add a break in @kohana but no success.
>
> Do you see what I mean?
>

add

  try_files $uri @kohana;

to the location ~* \.php$ { } block
-- 
O< ascii ribbon campaign - stop html mail - www.asciiribbon.org



More information about the nginx mailing list