Docker image for an httpd proxy with external configuration
A minimal httpd docker image to be run with an already existing configuration
docker build -t httpd-proxy .
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 up
export USER_PATH=/home/bobby
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 the stack :
docker-cloud stack start httpd-proxy
# or redeploy :
docker-cloud stack redeploy httpd-proxy
docker exec -it httpd-proxy bash