spujadas / lighttpd-docker

Docker image for lighttpd, a secure, fast, compliant, and flexible web server
MIT License
59 stars 65 forks source link

When enabling deflate.cache-dir error occurs (mod_deflate.c.824) can't stat deflate.cache-dir #27

Closed salutuj closed 1 year ago

salutuj commented 1 year ago

When I use default value deflate.cache-dir = var.statedir + "/cache/compress"

and by default var.statedir points to "/var/lib/lighttpd"

the folder /var/lib/lighttpd does not exists

/ # ls -al /var/lib total 20 drwxr-xr-x 5 root root 4096 May 23 2022 . drwxr-xr-x 1 root root 4096 Jul 17 2022 .. drwxr-xr-x 2 root root 4096 May 23 2022 apk drwxr-xr-x 2 root root 4096 May 23 2022 misc drwxr-xr-x 2 root root 4096 May 23 2022 udhcpd / #

and that causes startup failure (mod_deflate.c.824) can't stat deflate.cache-dir /var/lib/lighttpd/cache/compress: Permission denied 2023-01-19 20:38:28: (server.c.1572) Configuration of plugins failed. Going down.

spujadas commented 1 year ago

The image is intentionally streamlined for basic usage. Enabling modules may require extending the image, in this case by pre-creating the cache directory needed by the deflate module in a custom Dockerfile.