buggy example on wiki

Igor Sysoev is at rambler-co.ru
Tue Oct 23 17:57:15 MSD 2007


On Tue, Oct 23, 2007 at 02:05:27PM +0200, Martin Minka wrote:

> There are two types of examples on wiki about how to catch/serve static 
> files.
> The example A is not working correctly for names ending with the extension.
> I used the example A and added *.tar files as static (location ~* 
> ^.+\.(jpg|*jpeg*|gif|tar)$). I experienced troubles with 
> "http://server.com/katar". It was processed like static file

The "\.(jpg|jpeg|gif|tar)$" should not match "/katar".

> A)
> location ~* ^.+\.(jpg|*jpeg*|gif)$ {
> is used in:
> http://wiki.codemongers.com/NginxFullExample2
> http://wiki.codemongers.com/NginxRuExample
> http://wiki.codemongers.com/NginxDjangoFastCGI

As I understand the only NginxDjangoFastCGI is incorrect:

-    location ~* ^.+.(html|...
+    location ~* ^.+\.(html|...

> B)
> location ~* \.(gif|jpg|*jpeg*)$ {
> is used in core module documentation
> 
> 
> do you agree to change examples A ?

Where do you see "*jpeg*" ?

> is there a way to use mime type to catch static content ?

No.


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





More information about the nginx mailing list