42 lines
1.4 KiB
Django/Jinja
42 lines
1.4 KiB
Django/Jinja
# {{ ansible_managed }}
|
|
|
|
Listen {{ tripleo_container_registry_port }}
|
|
<VirtualHost {{ tripleo_container_registry_host }}:{{ tripleo_container_registry_port }}>
|
|
DocumentRoot {{ tripleo_image_data_dir }}
|
|
ErrorLog "/var/log/httpd/image_serve_error.log"
|
|
ServerSignature Off
|
|
CustomLog "/var/log/httpd/image_serve_access.log" combined
|
|
SetEnvIf X-Forwarded-Proto https HTTPS=1
|
|
RedirectMatch ^/$ /v2
|
|
|
|
<Directory {{ tripleo_image_data_dir }}>
|
|
# This assumes a file exists containing {} at
|
|
# {{ tripleo_image_data_dir }}/index.json
|
|
DirectoryIndex index.json
|
|
|
|
Options FollowSymLinks MultiViews
|
|
AllowOverride FileInfo
|
|
Require all granted
|
|
|
|
Header set Docker-Distribution-Api-Version registry/2.0
|
|
</Directory>
|
|
|
|
<LocationMatch "^/v2/.*/.*/blobs/sha256:.*$">
|
|
SetEnvIf Request_URI "sha256:(.*)$" digest=sha256:$1
|
|
Header set Docker-Content-Digest "%{digest}e"
|
|
Header set ETag "%{digest}e"
|
|
Header set Cache-Control "max-age=31536000"
|
|
Header set Content-Type "application/octet-stream"
|
|
</LocationMatch>
|
|
|
|
<LocationMatch "^/v2/.*/blobs/sha256:.*$">
|
|
SetEnvIf Request_URI "sha256:(.*)$" digest=sha256:$1
|
|
Header set Docker-Content-Digest "%{digest}e"
|
|
Header set ETag "%{digest}e"
|
|
Header set Cache-Control "max-age=31536000"
|
|
Header set Content-Type "application/octet-stream"
|
|
</LocationMatch>
|
|
|
|
|
|
</VirtualHost>
|