mirror of
https://github.com/kwk/docker-registry-frontend.git
synced 2024-09-20 07:16:23 +08:00
b23b59e3d6
enable secure connection to Docker registry.
50 lines
1.4 KiB
Plaintext
50 lines
1.4 KiB
Plaintext
<VirtualHost *:*>
|
|
|
|
DocumentRoot /var/www/html
|
|
ServerName localhost
|
|
|
|
# Proxy all docker REST API registry
|
|
# requests to the docker registry server.
|
|
|
|
ProxyPreserveHost On
|
|
ProxyPass /v1/ ${DOCKER_REGISTRY_SCHEME}://${DOCKER_REGISTRY_HOST}:${DOCKER_REGISTRY_PORT}/v1/
|
|
ProxyPassReverse /v1/ ${DOCKER_REGISTRY_SCHEME}://${DOCKER_REGISTRY_HOST}:${DOCKER_REGISTRY_PORT}/v1/
|
|
|
|
# Enable Kerberos authentication if requested
|
|
# NOTE: The module will be loaded or unloaded by the /root/start-apache.sh script.
|
|
# And the variables are also set by the script.
|
|
|
|
<IfModule mod_auth_kerb.c>
|
|
<Location "/">
|
|
Options FollowSymLinks Indexes
|
|
|
|
AuthType Kerberos
|
|
AuthName "${AUTH_NAME}"
|
|
KrbAuthRealms ${AUTH_KRB_REALMS}
|
|
KrbServiceName ${AUTH_KRB_SERVICE_NAME}
|
|
Krb5Keytab ${AUTH_KRB5_KEYTAB}
|
|
KrbMethodNegotiate on
|
|
KrbMethodK5Passwd on
|
|
|
|
Require valid-user
|
|
</Location>
|
|
</IfModule>
|
|
|
|
# Enable SSL encryption if requested
|
|
# NOTE: The module will be loaded or unloaded by the /root/start-apache.sh script.
|
|
|
|
<IfModule ssl_module>
|
|
ServerName localhost
|
|
SSLEngine on
|
|
SSLCertificateFile /etc/apache2/server.crt
|
|
SSLCertificateKeyFile /etc/apache2/server.key
|
|
</IfModule>
|
|
|
|
# Allow ping and users to run unauthenticated.
|
|
<Location /v1/_ping>
|
|
Satisfy any
|
|
Allow from all
|
|
</Location>
|
|
|
|
</VirtualHost>
|