Ask Bjørn Hansen 397ec295ca
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Document logging behavior and dontlog feature
2026-01-31 20:56:03 -08:00

static-misc

Test locally

docker build -t static-web:1 .
git clone git@git.develooper.com:perl-static-misc.git git

docker run -p 8000:80 --name static-misc \
   -v `pwd`/git:/git/static -v `pwd`/config:/web/config \
   -ti --rm static-web:1

Test with

curl -H 'Host: i.perl.org' localhost:8000

To get a shell in the container run

docker exec -ti static-misc bash

And then run curl -H 'Host: i.perl.org' localhost there.

Logging

Access logs are sent to stdout and error logs to stderr, making them available to the container runtime's log collection.

The Apache configuration supports a dontlog environment variable. When set on a request, that request is excluded from the access log. This is useful for health check endpoints that would otherwise fill the logs.

To use it, add a SetEnvIf directive in your site configuration:

SetEnvIf Request_URI "^/ok.txt$" dontlog

This allows /ok.txt to serve as a health check endpoint without generating access log entries.

Production image

The "production image" is at harbor.ntppool.org/library/static-web:latest (or rather tagged with the most recent version, for example 2.2.0)

Description
static-web container
Readme 60 KiB
Languages
Dockerfile 67.5%
Shell 32.5%