项目作者: bertrandmartel

项目描述 :
Docker image for an httpd proxy with external configuration
高级语言: ApacheConf
项目地址: git://github.com/bertrandmartel/httpd-proxy.git
创建时间: 2016-11-08T13:23:48Z
项目社区:https://github.com/bertrandmartel/httpd-proxy

开源协议:

下载


Httpd proxy minimal docker image

Build Status

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

Build image

  1. docker build -t httpd-proxy .

Usage

  • edit default configuration : 000-default.conf :
  1. ServerName www.example.com
  2. <VirtualHost *:443>
  3. SSLEngine on
  4. SSLCertificateFile "/usr/local/apache2/conf/key/fullchain.pem"
  5. SSLCertificateKeyFile "/usr/local/apache2/conf/key/privkey.pem"
  6. SSLProxyEngine On
  7. RequestHeader set Front-End-Https "On"
  8. ProxyPass / https://www.google.com/
  9. ProxyPassReverse / https://www.google.com/
  10. </VirtualHost>
  • place your server certificate/key in a key folder

  • start httpd proxy :

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

Docker-compose

  1. docker-compose up

Docker-cloud

  1. export USER_PATH=/home/bobby
  • revise your stackfile.yml file before creating/updating the stack :
  1. # create the stack :
  2. docker-cloud stack create --name httpd-proxy -f stackfile.yml
  3. # or update :
  4. docker-cloud stack update -f stackfile.yml httpd-proxy
  • start/deploy :
  1. # start the stack :
  2. docker-cloud stack start httpd-proxy
  3. # or redeploy :
  4. docker-cloud stack redeploy httpd-proxy

Debug

  1. docker exec -it httpd-proxy bash