wodby / drupal-php

PHP docker container image for Drupal
https://wodby.com/stacks/drupal
MIT License
61 stars 79 forks source link

Private files image styles #32

Closed webdobe closed 7 years ago

webdobe commented 7 years ago

I am unable to get private files to generate image styles. Public ones work fine. Uploading private files work fine. Generating image styles does not.

csandanov commented 7 years ago

Try adding the following location and see if it helps.

location ~* /system/files/styles/ {
    access_log {{ getenv "NGINX_STATIC_CONTENT_ACCESS_LOG" "off" }};
    expires {{ getenv "NGINX_STATIC_CONTENT_EXPIRES" "30d" }};
    try_files $uri @drupal;
 }
csandanov commented 7 years ago

Try the latest drupal-nginx image (non-tagged) with this fix https://github.com/wodby/drupal-nginx/issues/25

webdobe commented 7 years ago

Ok it was wodby/drupal-nginx#25 what I was missing. I had added the other based on other drupal threads. was missing the included params in the system files section.

So both of these together are what solved my issues.

csandanov commented 7 years ago

@webdobe to be clear, what did you do in addition to this include fix in drupal-nginx?

csandanov commented 7 years ago

@webdobe ping

webdobe commented 7 years ago

It appears that the things that fixed it were fixes found here: wodby/drupal-nginx#25

I had already applied before your comment:

location ~* /system/files/styles/ {
    access_log {{ getenv "NGINX_STATIC_CONTENT_ACCESS_LOG" "off" }};
    expires {{ getenv "NGINX_STATIC_CONTENT_EXPIRES" "30d" }};
    try_files $uri @drupal;
 } 

I didn't test not having that.

csandanov commented 7 years ago

Ok, so the include fastcgi_params; fix did the trick.