Sign inSign up

andrewmackrodt/apache2

By andrewmackrodt

Updated 4 months ago

Apache 2.4 with Let's Encrypt support.

Image
0

10K+

andrewmackrodt/apache2 repository overview

andrewmackrodt/docker-apache2

Status Pulls Dockerfile Size Version

Apache HTTP Server Project is an effort to develop and maintain an open-source HTTP server for modern operating systems including UNIX and Windows. A secure, efficient and extensible server that provides HTTP services in sync with the current HTTP standards.

Features

Apache HTTP Server Version 2.4.

  • Let's Encrypt certificate generation and renewal
  • X-Forwarded-For support for default docker subnet
  • AllowOverride all configured in /var/www
  • Directory Indexes forbidden in /var/www
  • www-data uses the same UID as the ubuntu account
  • Modules: rewrite, headers, ssl, remoteip

Usage

LETS_ENCRYPT_ environment variables are optional.

docker
# create the container
docker create \
  --name mysite \
  -p 8080:80 \
  -p 8443:443 \
  -e PUID=$(id -u) \
  -e PGID=(id -g) \
  -e LETS_ENCRYPT_DOMAINS=97e0973.ngrok.io \
  -e [email protected] \
  -e LETS_ENCRYPT_STAGING=0 \
  -v $HOME/public_html:/var/www/html \
  -v $HOME/.certbot/mysite:/etc/letsencrypt/live \
  andrewmackrodt/apache2

Parameters

ParameterFunction
-p 8080:80Expose port 80 on the host
-p 8443:443Expose port 443 on the host
-e PUID=1000The user id, recommended: $(id -u)
-e PGID=1000The group id, recommended: $(id -g)
-e SUDO_NOPASSWD=0Set to 1 to allow passwordless sudo
-e LETS_ENCRYPT_DOMAINS=Domain's to request certificates for, comma separated
-e LETS_ENCRYPT_EMAIL=E-mail address to receive Let's Encrypt Notifications
-e LETS_ENCRYPT_STAGING=0Set to "1" to use staging server
-v /var/www/htmlApache DocumentRoot
-v /etc/letsencrypt/liveCertbot Let's Encrypt directory

Tag summary

Content type

Image

Digest

sha256:e643aa2e5

Size

78.6 MB

Last updated

4 months ago

docker pull andrewmackrodt/apache2