Public | Automated Build

Last pushed: 7 months ago
Short Description
Docker image for an httpd proxy with external configuration
Full Description

Httpd proxy minimal docker image

A minimal httpd docker image to be run with an already existing configuration

Build image

docker build -t httpd-proxy .

Usage

  • edit default configuration : 000-default.conf :
ServerName www.example.com

<VirtualHost *:443>
    SSLEngine on
    SSLCertificateFile "/usr/local/apache2/conf/key/fullchain.pem"
    SSLCertificateKeyFile "/usr/local/apache2/conf/key/privkey.pem"
    SSLProxyEngine On
    RequestHeader set Front-End-Https "On"
    ProxyPass / https://www.google.com/
    ProxyPassReverse / https://www.google.com/
</VirtualHost>
  • place your server certificate/key in a key folder

  • start httpd proxy :

docker run -dit --name httpd-proxy -p 443:443 \
                                   -v "$PWD/apache2.conf":/usr/local/apache2/conf/httpd.conf \
                                   -v "$PWD/000-default.conf":/etc/apache2/sites-enabled/000-default.conf \
                                   -v "$PWD/key":/usr/local/apache2/conf/key apache-php

Docker-compose

docker-compose up

Docker-cloud

export USER_PATH=/home/bobby
  • revise your stackfile.yml file before creating/updating the stack :
# create the stack :

docker-cloud stack create --name httpd-proxy -f stackfile.yml

# or update :

docker-cloud stack update -f stackfile.yml httpd-proxy
  • start/deploy :
# start the stack :

docker-cloud stack start httpd-proxy

# or redeploy :

docker-cloud stack redeploy httpd-proxy

Debug

docker exec -it httpd-proxy  bash
Docker Pull Command
Owner
bertrandmartel
Source Repository

Comments (0)