dotcloud/docker-registry — pull request #152 by theopolis (2013-12-12 05:46:42+00:00)
Title: Anyone interested in an example Apache2 config? 

I could submit a PR to add alongside the nginx, if you'd like to support Apache2. :)

```

ServerName registry.example.com
ServerAlias www.registry.example.com

SSLEngine on
SSLCertificateFile /etc/apache2/ssl/registry.example.com.crt
SSLCertificateKeyFile /etc/apache2/ssl/registry.example.com.key

Header set Host "registry.example.com"
RequestHeader set X-Forwarded-Proto "https"

ProxyRequests off
ProxyPreserveHost on
ProxyPass / http://127.0.0.1:5000/
ProxyPassReverse / http://127.0.0.1:5000/

ErrorLog ${APACHE_LOG_DIR}/registry-error.log
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/registry-access.log combined

Order deny,allow
Allow from all

AuthName "Registry Authentication"
AuthType basic
AuthUserFile "/etc/apache2/htpasswd/registry-htpasswd"
Require valid-user

# Allow ping and users to run unauthenticated.

Satisfy any
Allow from all

Satisfy any
Allow from all

```

I start the docker using:

```
docker run -d -p 5000:5000 -v /my/registry/data:/tmp/registry stackbrew/registry
```