Welcome! Log In Create A New Profile

Advanced

try_files for cache

Marcos Neves
December 04, 2009 08:34AM
I am using this config to try the url, if not found, try the same url under
/_cache/ if not, use the router at index.php

location / {
try_files $uri /_cache$uri /index.php;
}

I dont try the above for those kind of files, so I want to get a 404 when
they are not founded.

location ~* \.(css|js|jpg|png|gif|swf|html?|txt|sql|doc|pdf|xls)$ {
}


- Is there a better way to do the same?
- how can I put the _cache folder outside webroot? Is it possible to
serve files outside root folder?
- this configuration will break my passenger routes?



Marcos Neves
+55 44 9918-8488
_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

try_files for cache

Marcos Neves December 04, 2009 08:34AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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