"Idiomatic" Gallery3 configuration

Gwyneth Llewelyn nginx-forum at nginx.us
Tue Feb 11 12:17:35 UTC 2014


As far as I can tell, this looks good to me, and it's better to use rewrites
than "if", which is what (sadly) the Gallery3 wiki still shows.

My current issue is that album thumbnails, which use an URL ending in
[i].album.jpg?...[/i] (a dot before the album name, a query with a question
mark after .jpg) doesn't seem to be caught by these rules and throws a 403.
I wonder why, because [b]rewrite ^/var/(albums|thumbs|resizes)/(.*)$
/file_proxy/$2 last;[/b] should catch it.

Maybe it needs another rewrite rule, e.g.

[b]rewrite ^/var/(albums|thumbs|resizes)/(.*)?(.*)$ /file_proxy/$2?$3
last;[/b]

I haven't tested it out, though. I'm still very shaky with nginx
configuration!

Thanks for posting this. I'm glad to see that there are plenty of people
using Gallery3 with nginx. It makes a lot of sense, since images can be
accessed directly by nginx and served immediately without the need to go
through the PHP processor...

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,242413,247391#msg-247391



More information about the nginx mailing list