Has anyone been able to get their Drupal with Nginx to work with image style after 7.20 upgrade?

Events happening in the community are now at Drupal community events on www.drupal.org.
fehin's picture

I have tried several tips and none worked. I also used the recommended fix $conf['image_allow_insecure_derivatives'] = TRUE;, it didn't work. I tried the module version of it http://drupal.org/project/image_allow_insecure_derivatives, still not working.

Comments

I just installed a fresh 7.22

bhosmer's picture

I just installed a fresh 7.22 site with NGINX, and haven't had any problems uploading images using the default article.

Is this the problem you're having or am I missing your question?

It's very weird. One site

fehin's picture

It's very weird. One site worked but the rest are not working. Did fresh install in a subdirectory in the site that works and the one that doesn't and image styles are not being created in both fresh installs. The Nginx conf setting are the same for all the sites so I don't know what is causing this problem.

I found the issue. It was my

fehin's picture

I found the issue. It was my sever setup. Since the same setting was working for one of my sites, I wasn't sure it was the issue.

I changed my setting from

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

to (thanks to http://drupal.stackexchange.com/questions/56462/is-there-a-common-nginx-...)

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

and the image styles are now created.

Nginx

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: