Bug #1027

alias and mod_compress

Added by Anonymous about 10 years ago. Updated about 9 years ago.

Target version:
Start date:
Due date:
% Done:


Missing in 1.5.x:


When using an alias, mod_compress dosent create subdirectories for the cached compressed files.

Exmaple (n is an alis to

2007-02-12 12:57:03: (mod_compress.c.398) creating cachefile /var/lib/lighttpd/cache/compress//n/themes/obalanet/screen.css-gzip-7964071-2250-1170856112 failed No such file or directory

but /var/lib/lighttpd/cache/compress/ exists.

-- duck

Fix-mod_compress-bug-1027-lighty1.4.patch View - Tested patch (previous missed symbol "ERROR"), ignore trailing slash now (3.09 KB) stbuehler, 2008-02-15 15:06

Fix-mod_compress-bug-1027-lighty1.5.patch View - Ignore trailing slash now + ERROR log style (7.09 KB) stbuehler, 2008-02-15 15:42

lighttpd-1.4.18-compress-mkdir.patch View - Optimized version of patch for 1.4.18. (2.77 KB) spillgroup, 2008-03-07 13:42

lighttpd-1.4.19-compress-mkdir.patch View - Optimization patch for 1.4.19 (1.14 KB) spillgroup, 2008-03-12 13:56

Associated revisions

Revision d0862e85 (diff)
Added by stbuehler about 9 years ago

r2086@chromobil: stefan | 2008-02-26 16:15:28 +0100
Fix #1027: create directories in mod_compress (was broken with alias/userdir)

git-svn-id: svn:// 152afb58-edef-0310-8abb-c4023f1b3aa9


#1 Updated by darix about 10 years ago

can you show us the module load order?
the easiest thing might be lighttpd -tp -f /path/to/config 2>&1 | less
and paste the server.modules section from it.

#2 Updated by Anonymous about 10 years ago

cachefile /var/lib/lighttpd/cache/compress//n/themes/obalanet/screen.css-gzip-7964071-2250-1170856112

isn't there one slash too many after comptess?

-- j3rky

#3 Updated by Anonymous almost 10 years ago

I'm having the same problem here. Is there a solution?

My server.modules section:

server.modules = (
    # 11

-- ecook

#4 Updated by stbuehler over 9 years ago

I did not try if the patches are working (I don't use mod_compress), so please report if it works for you.

#5 Updated by stut about 9 years ago

Was having the same problem here on 1.4.18 - can confirm that the attached patch for 1.4 works.

#6 Updated by Anonymous about 9 years ago

mkdir_recursive will cause segfault while creating something like "/dir1/" (with trailing slash).

while ((p = strchr(p + 1, '/')) != NULL) {

must be

while ((*p) && (p = strchr(p + 1, '/')) != NULL)) { 

#7 Updated by stbuehler about 9 years ago

+ Duplicate of #230

#8 Updated by Anonymous about 9 years ago

please fix! this is a huge annoyance.

#9 Updated by stbuehler about 9 years ago

Fixed in r2081 for 1.4.x

#10 Updated by spillgroup about 9 years ago

I've attached a slightly modified version for 1.4.18 which is a bit smarter with mkdir's. The previous behaviour was to try and mkdir every part of a file's patch on every access (even when already in the cache). This patch moves the mkdir's to after the place where it checks for existence.

#11 Updated by stbuehler about 9 years ago

  • Status changed from New to Fixed
  • Resolution set to fixed

Fixed in r2135 for lighty-1.5.x with optimization - i hope it works ;-)

Also available in: Atom