(Article) Lighttpd + Drupal + Imagecache
Article : Lighttpd + Drupal + Imagecache
I have a client whose sysadmin is adamant about using Lighttpd as a webserver, whose site also uses imagecache.
There are some major differences in Lighttpd's rewrite system compared to Apache's rewrite system. The difference that is most important is the lack of the file exists check provided by the -f flag to apache's rewrite conditions.
The way imagecache works is to dynamically generate images that don't exist when they're requested from it's url namespace. So if you request http://example.com/files/imagecache/thumbnail/myimage.jpg and it doesn't exist the url rules rewrite it as http://example.com/index.php?q=files/imagecache/thumbnail/myimage.jpg
and drupal passes the request to imagecache. If the file does exist Apache just serves it directly.
Since Lighttpd's rewrite rules do not support this file exists flag they are unsuitable to solving our problem. I tried setting up several different variations of rewrite rules, specialized 404 handling.
Finally after searching I found, http://nordisch.org/2007/2/6/drupal-on-lighttpd-with-clean-urls
So after installing mod_magnet, and editing the url prefixing for my local installation everything works wonderfully...
Courtesy : Darrelopry.com
- guru's blog
- Login to post comments
![Drupal-6-Book-[Building Powerful and Robust Websites with Drupal 6].jpg](http://www.drupalranch.com/images/Drupal-6-Book-[Building%20Powerful%20and%20Robust%20Websites%20with%20Drupal%206].jpg)