Sign inSign up

jheimbach/apache

By jheimbach

•Updated about 6 years ago

Apache docker container with customizable configuration

Image
0

907

jheimbach/apache repository overview

⁠Docker Apache

Apache docker container with customizable configuration

The following (additional) Modules are enabled:

  • rewrite
  • socache_shmcb
  • ssl
  • proxy
  • proxy_fcgi

⁠ENV

The following env_vars are available

⁠Apache Settings
EnvvarSettingDefault
APACHE_LOCK_DIRLock Dir/var/lock/apache2
APACHE_PID_FILEpid file/var/run/apache2.pid
APACHE_RUN_USERuser who is running apachewww-data
APACHE_RUN_GROUPusergroup who is running apachewww-data
APACHE_LOG_DIRapache log dir/var/log/apache2
APACHE_SERVER_NAMEServerNamelocalhost
APACHE_CONF_SITEVirtual host settingssites-enabled/site.conf
APACHE_SITE_CONF_SSLVirtual host ssl settingssites-enabled/site-ssl.conf
APACHE_CONF_CUSTOMCustom⁠ Apache Settings, included in apache2.confconf-enabled/custom.conf
APACHE_SSL_ENGINESSLEngineOn
APACHE_SSL_CERT_FILESSLCertificateFile/etc/apache/ssl/site.pem
APACHE_SSL_KEY_FILESSLCertificateKeyFile/etc/apache/ssl/site.key
⁠Virtual Host settings
EnvvarSettingDefault
APACHE_SITE_ADMINServerAdminwebmaster@localhost
APACHE_SITE_NAMEServerName$APACHE_SERVER_NAME (localhost)
APACHE_SITE_ROOTDocumentRoot/var/www/html
APACHE_SITE_ALIASESServerAlias$APACHE_SITE_NAME (localhost)

⁠PHP Ready

PHP-ready (just spin a php-fpm container up) php-files are send via fast_cgi to another container with the Standardname php editable via PHP_SERVER env_var

⁠SSL

If you want to use ssl (https), copy cert and key to the machine and reference them with APACHE_SSL_CERT_FILE and APACHE_SSL_KEY_FILE OR provide the files via volumes

or use docker secrets (v >1.25) and point them to /etc/apache/ssl/site.pem and /etc/apache/ssl/site.key

⁠example docker run
  docker run \
      -v ./cert.pem:/etc/apache/ssl/site.pem:ro \
      -v ./cert.key:/etc/apache/ssl/site.key:ro \
      jheimbach/apache
⁠example docker-compose
  webserver:
    image: jheimbach/apache:latest
    volumes:
    - ./cert.pem:/etc/apache/ssl/site.pem:ro
    - ./cert.key:/etc/apache/ssl/site.key:ro

Tag summary

Content type

Image

Digest

Size

116.8 MB

Last updated

about 6 years ago

docker pull jheimbach/apache