Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By alphacentauri on
When selecting the "Default download method" to "Private local files served by Drupal" my images won't work anymore.
Using the public method the "imagecached" image on admin/config/media/image-styles/edit/thumbnail shows as expected, but when switched to 'private' this image won't show - The URL of the image gets in a redirect-loop to itself.
The configuration of the Nginx virtual host can be found on https://gist.github.com/antichaos/a40d13b43e25b695b2b0
Probably I am overlooking an obvious mistake in the nginx-config - but until now I didn't find it...
Comments
Add extra nginx config
I know this is an old thread, but for posterity to help my future self and anyone else looking for a solution:
I had to add the following section to my nginx site configuration:
This intercepts any requests starting with /system/files (which is Drupal's internal callback for checking access to private files) and routes the request through Drupal's index page.
For completeness, If you don't already have the @rewrite directive elsewhere in your file, mine looks like:
--
Barry Fisher
Pivale