Correct way to serve static files ?

Igor Sysoev is at rambler-co.ru
Tue Oct 20 17:11:22 MSD 2009


On Mon, Oct 19, 2009 at 07:12:14PM -0400, George wrote:

> thanks Daniel much appreciated :)
> 
> I had my configs with first line so guess it was a lucky copy and paste. But i've seen a handful of configs online exactly like the second line hmmm.

Current PCRE library handles equally these regexes

        location ~* \.(jpg|jpeg|gif|css|png|js|ico)$ {

and

        location ~* ^.+\.(jpg|jpeg|gif|css|png|js|ico)$ {

It parses a line from its start, but not from '$' anchor.


-- 
Igor Sysoev
http://sysoev.ru/en/





More information about the nginx mailing list