Help with the files directory

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
antoniocuga's picture

Hi folks. I trying to configure the files directory in my Debian Server, but the images styles doesn't generate. Anyone know about this? there is a specific permission for this directory?

I hope anyone can help me.

Cheers.

Comments

Temp Solution

mikeytown2's picture

You can use this module to generate the image styles on upload https://www.drupal.org/project/imageinfo_cache

Lighttpd requires conditional rewrite

ulfjack2's picture

You need to setup lighttpd such that it conditionally rewrites the URLs to the images styles if the file does not exist yet. Then drupal generates the file and subsequent requests are handled by lighttpd instead. Here's the config I'm using:

  url.rewrite-once = (
    "^/([^.?])\?(.)$" => "/index.php?q=$1&$2",
    "^/([^.?])$" => "/index.php?q=$1",
    "^/rss.xml" => "/index.php?q=rss.xml",
  )
  url.rewrite-if-not-file = (
    "^/(files/styles/.
)\?(.)$" => "/index.php?q=$1&$2",
    "^/(files/styles/.
)$" => "/index.php?q=$1",
  )

We've been struggling with this exact problem and it took a while to debug what was going wrong.

Lighttpd

Group organizers

Group notifications

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

Hot content this week