I have a peculiar problem. I have 3 sites on a Debian/Nginx setup. Let's call them site1.com, site2.com and site3.com. After upgrading to 7.20, site2.com and site3.com image styles stops being created while site1.com is working. I installed fresh Drupal 7.22 in a subdirectory in site1.com and site2.com (also upgraded all the sites to 7.22). The fresh installations won't create image styles either. I thought the fresh installation in site1.com subdirectory will work since site1.com itself works fine but that's not the case. I'm totally lost here. The Nginx site conf settings are the same for all the sites so I'm not sure it's a server issue. I have spent the past few days reading about this but can't an issue similar to mine.

I just followed the instruction here http://drupal.org/node/244924 to fix any file permission issues but the image styles are still not generated. I also tried this module http://drupal.org/project/image_allow_insecure_derivatives, it didn't work either.


1 Answer 1


It was my sever setup after all. Thanks to this post: Is there a common nginx conf for Drupal 7 sites?, I was able to fix the issue. Image styles now work on all my sites.

My initial setup was

    location ~ ^/sites/.*/files/styles/ {
            try_files $uri @rewrite;

The above setup worked for a while and was working for one of my sites but won't work after upgrade for the others for some reason.

I changed it to this

    # Image styles for D7
    location ~* /sites/.*/files/styles/ {
            access_log off;
            expires 30d;
            try_files $uri @rewrite;

and it's working now.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.