The Apache HTTP Server App, v2.4.x. Support for x86_64 | arm64 | ppc64le.
10K+
The Apache HTTP Server Project is an effort to develop and maintain an open-source HTTP server for modern operating systems including UNIX and Windows. The goal of this project is to provide a secure, efficient and extensible server that provides HTTP services in sync with the current HTTP standards.
The container can be easily setup with the following environment variables:
HTTPD_LOG_LEVEL: Set the log level for the apache httpd server (see LogLevel Directive for possible values). Default: warnHTTPD_TLS_ROOTCA: Whether to enable rootca for TLS or not. Default: disable
To customize the configuration of the httpd server, you can obtain the upstream default configuration from the container:
$ docker run --rm --entrypoint '' laineil/httpd:[tag] cat /etc/httpd/conf/httpd.conf > custom_httpd.conf
$ docker run --rm --entrypoint '' laineil/httpd:[tag] cat /etc/httpd/conf.d/ssl.conf > custom_ssl.conf
Here are a few methods for running a container.
$ docker run -d \
--name httpd_app \
-v [ext_html_dir]:/var/www/html/[int_html_dir] \
-p [expose_port]:8080 \
-p [expose_port]:8443 \
laineil/httpd:[tag]
# Make sure the owner uid of [ext_html_dir] is 1000.
$ docker run -d \
--name httpd_app \
-v [ext_html_dir]:/var/www/html/[int_html_dir] \
-v [certs_path]:/opt/certs:ro \
-p [expose_port]:8080 \
-p [expose_port]:8443 \
-e HTTPD_TLS_ROOTCA=enable \
laineil/httpd:[tag]
# [certs_folder] must contains rootca.crt, server.crt, server.key (certificate name must match).
# Make sure the certificate files within [certs_folder] have permission 644.
$ docker run -d \
--name httpd_app \
-v custom_httpd.conf:/etc/httpd/conf/httpd.conf \
-v custom_ssl.conf:/etc/httpd/conf.d/ssl.conf \
-p [expose_port]:8080 \
-p [expose_port]:8443 \
laineil/httpd:[tag]
# Make sure the permission of conf files is 644.
$ docker logs httpd_app
$ docker container stop httpd_app
$ docker container rm httpd_app
BSD 3-Clause License
Copyright (c) 2023, Laineil
All rights reserved.
Content type
Image
Digest
sha256:f35d20748…
Size
61.3 MB
Last updated
4 months ago
docker pull laineil/httpd