Quantcast
Channel: Front Seed Labs - Lighttpd
Viewing all articles
Browse latest Browse all 2

Using Drupal Imagecache with Lighttpd proxied Apache

$
0
0

Using Lighttpd as a proxy for Apache is a popular solution to achieve smaller web server memory footprint and to speed up websites. However things can get messy when it comes to Drupal and the brilliant Imagecache module. Imagecache transforms images using presets and then caches them.

An imagecache url is something like: http://domain.tld/sites/default/files/imagecache/presetname/photo.jpg This will take the the image placed at sites/default/files/photo.jpg and transforms it according to presetname. After succesful operation the image will be available as a static file at sites/default/files/imagecache/presetname/photo.jpg

No need to say, this functionality breaks when the frontend web server only forwards requests to php files so imagecache images won't show up and will not be generated.

One solution is: set up a separate subdomain to serve these images and redirect all imagecache images to this subdomain. This needs some simple LUA scripting, Lighttpd will forward an imagecache url if it hasn't created yet, and will serve it directly if it's already there.

read more


Viewing all articles
Browse latest Browse all 2

Trending Articles