Image files (jpg,png) could not be opened.

Irina nginx-forum at
Mon Feb 7 18:57:35 MSK 2011

Yes, you are right, I have this line in my config that conflicts when I
would like to open any image files.
location ~* \.(ico|css|gif|js|jpe?g|png)(\?[0-9]+)?$ {
                        add_header Cache-Control "must-revalidate";
          expires max;
But I need it otherwise pages will be loading extremely slow. So this
line along with my previous updates give me the correct behavior.

Posted at Nginx Forum:,172228,172890#msg-172890

More information about the nginx mailing list