case insensitive

Igor Sysoev igor at
Thu Jul 29 10:47:07 MSD 2010

On Wed, Jul 28, 2010 at 11:26:24PM -0700, Eire Angel wrote:

> I need to serve images to be case insensitive.
> too many of the external links were created using the incorrect case for me to 
> just create redirects for them all
> I am trying to use : 
> location ~* ^.+.(jpg|jpeg|gif|png)$ {
>  root              /var/www/my_app/current/public/images;                
> access_log        off;
> expires           30d;
> }
> i have also tried using :
> location ~* ^/images/$ {}
> with the same results.  please help

nginx does not support case insensitive file access on a case sensitive file
system. Theoretically this can be implemented, however, it requires
a lot of overhead: instead of single open() syscall, nginx has to call
opendir()/readir()/closedir() which involve about ten syscalls. Although
frequently requested files can be cached in open_file_cache.

Igor Sysoev

More information about the nginx mailing list