Sign inSign up

chrisipa/apache

By chrisipa

•Updated about 6 years ago

Apache HTTPD docker image based on Ubuntu Bionic.

Image
0

4.5K

chrisipa/apache repository overview

⁠Apache HTTPD

Apache HTTPD docker image based on Ubuntu Bionic.

⁠Source Code

Sources to build this docker image can be found here⁠.

⁠Description

This Apache HTTPD docker image contains the following software components:

⁠Modules

These Apache HTTPD modules are activated by default:

  • authnz_ldap
  • deflate
  • headers
  • lbmethod_byrequests
  • proxy
  • proxy_ajp
  • proxy_balancer
  • proxy_http
  • proxy_hcheck
  • proxy_wstunnel
  • rewrite
  • ssl

⁠Ports

These Apache HTTPD ports are exposed:

  • 80 (http)
  • 443 (https)

⁠How to run the container

⁠Environment variables

When you start the Apache HTTPD container, you can adjust the configuration by passing one or more environment variables on the docker run command line:

⁠SSL_FOLDER
  • The folder where the SSL certificate files are located
  • Default value: /opt/ssl/apache2

⁠Using docker

⁠Example 1: Evaluation usage without any custom files
  1. Run Apache HTTPD container with this command:
docker run --rm -p 80:80 -p 443:443 chrisipa/apache
⁠Example 2: Daemon usage serving custom static files from host
  1. Create a folder with custom static files:
sudo mkdir -p /var/www/html  
  1. Place static files in target folder:
sudo cp files /var/www/html  
  1. Run Apache HTTPD container with this command:
docker run -d --name apache -p 80:80 -p 443:443 -v /var/www/html:/var/www/html chrisipa/apache

⁠Advanced topics

⁠Create your own self signed SSL certificates
  1. Create CA Certificate:

    openssl req -new -x509 -days 36500 -nodes \
        -out ca.crt \
        -keyout ca.key
    
  2. Create Certificate Serial Number:

    echo -ne '01' > ca.serial
    
  3. Create Server CSR:

    openssl req -new -days 36500 -nodes \
        -out server.csr \
        -keyout server.key
    
  4. Create Server Certificate:

    openssl x509 -days 36500 \
        -CA ca.crt \
        -CAkey ca.key \
        -CAserial ca.serial \
        -in server.csr \
        -req \
        -out server.crt
    
⁠References

Tag summary

Content type

Image

Digest

Size

97.6 MB

Last updated

about 6 years ago

docker pull chrisipa/apache