aerzas/httpd

By aerzas

Updated 7 months ago

HTTPD docker container image that requires no specific user or root permission to function.

Image
Web Servers
0

10K+

HTTPD

HTTPD docker container image that requires no specific user or root permission to function.

Image comes with presets:

  • default: serve static files
  • php: proxy requests to a PHP-FPM backend

Supported tags

Docker compose example

version: '3.5'
services:
    php:
        image: aerzas/httpd:2.4-latest
        environment:
              HTTPD_VHOST_ALLOW_OVERRIDE: All
              HTTPD_VHOST_PRESET: php
              HTTPD_VHOST_ROOT: /var/www/html/web
        ports:
            - '80:8080'
        healthcheck:
            test: ["CMD", "/scripts/docker-healthcheck.sh"]
            interval: 30s
            timeout: 1s
            retries: 3
            start_period: 5s

Additional extra configuration files can be mounted in /usr/local/apache2/conf/extra while additional presets should be mounted in /usr/local/apache2/conf/presets, files mounted as .tmpl will have their environment variables automatically replaced.

Environment Variables

VariableDefault Value
Server
HTTPD_HOSTNAME_LOOKUPSOff
HTTPD_KEEPALIVEOn
HTTPD_KEEPALIVE_REQUESTS100
HTTPD_KEEPALIVE_TIMEOUT75
HTTPD_REQUEST_WORKERS100
HTTPD_SERVER_ADMINroot@localhost
HTTPD_SERVER_NAMElocalhost
HTTPD_SERVER_SIGNATUREOff
HTTPD_SERVER_TOKENSProd
HTTPD_TIMEOUT10
HTTPD_TIMEOUT_REQUESThandshake=5 header=10 body=10
HTTPD_TRACE_ENABLEOff
HTTPD_USE_CANONICAL_NAMEOff
Log
HTTPD_LOG_CUSTOM/proc/self/fd/1 common env=!nolog
HTTPD_LOG_ERROR/proc/self/fd/2
HTTPD_LOG_FORMAT'%h %l %u %t \"%r\" %>s %b'
HTTPD_LOG_LEVELwarn
Multi-processing modules
HTTPD_MPM_MAX_CLIENTS400
HTTPD_MPM_THREAD_LIMIT64
HTTPD_MPM_THREADS_PER_CHILD25
HTTPD_MPM_SERVER_LIMIT16
HTTPD_MPM_START_SERVERS3
Static
HTTPD_DOCUMENT_CACHE_CONTROL"public"
HTTPD_DOCUMENT_EXPIRES_ACTIVEOn
HTTPD_DOCUMENT_EXPIRES_DEFAULT"access plus 1 days"
HTTPD_DOCUMENT_PRAGMA"cache"
HTTPD_STATIC_CACHE_CONTROL"public"
HTTPD_STATIC_EXPIRES_ACTIVEOn
HTTPD_STATIC_EXPIRES_DEFAULT"access plus 7 days"
HTTPD_STATIC_PRAGMA"cache"
Vhost
HTTPD_VHOST_ALLOW_OVERRIDENone
HTTPD_VHOST_HTTP2true
HTTPD_VHOST_INDEX_FILE
HTTPD_VHOST_OPTIONSFollowSymLinks
HTTPD_VHOST_PRESETdefault
HTTPD_VHOST_ROOT/var/www/html
Preset "php"
HTTPD_BACKEND_HOSTphp
HTTPD_BACKEND_PORT9000
HTTPD_FCGI_PROXY_CONNECT_TIMEOUT1
HTTPD_FCGI_PROXY_TIMEOUT10

Docker Pull Command

docker pull aerzas/httpd