Docker Apache: a lightweight httpd:alpine image with auto-config enabling essential mods, SSL ready.
7.3K
A custom Apache HTTP Server Docker image built on top of the lightweight httpd:alpine.
It ships with a small config updater that enables commonly needed modules (proxy/FCGI, SSL, rewrite, headers, etc.) and applies a few sane defaults.
httpd:alpinemod_proxy, mod_proxy_fcgimod_rewritemod_ssl + socache_shmcbmod_headers, mod_deflatetzdata + TZ envdocker build -t infocyph/docker-apache:latest .
docker run -d \
--name apache \
-p 80:80 -p 443:443 \
-e TZ=Asia/Dhaka \
-e SERVER_NAME=localhost \
infocyph/docker-apache:latest
| Variable | Default | Description |
|---|---|---|
TZ | (empty) | Container timezone (example: Asia/Dhaka) |
SERVER_NAME | localhost | Apache ServerName used by the config updater |
APACHE_LOG_DIR | /var/log/apache2 | Log directory path (mount if you want persistence) |
Note:
SERVER_NAMEis applied by the build-time config updater in the current image design.
To persist logs on the host:
docker run -d \
--name apache \
-p 80:80 -p 443:443 \
-v "$(pwd)/logs:/var/log/apache2" \
infocyph/docker-apache:latest
docker exec -it apache sh -lc 'httpd -v && httpd -M | head'
MIT — see MIT License.
Content type
Image
Digest
sha256:7e04e6d59…
Size
24.1 MB
Last updated
about 7 hours ago
docker pull infocyph/apache