
Nobody needs to see the default apache page, let's just redirect to v2 so operators aren't confused. Change-Id: I465bcf9358bf85dd8e7f4bd199b5dcee703b8ab4
30 lines
1.0 KiB
Django/Jinja
30 lines
1.0 KiB
Django/Jinja
Listen {{ container_registry_port }}
|
|
<VirtualHost {{ container_registry_host }}:{{ container_registry_port }}>
|
|
DocumentRoot {{ 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 {{ image_data_dir }}>
|
|
# This assumes a file exists containing {} at
|
|
# {{ 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>
|
|
</VirtualHost>
|