tripleo-ansible/tripleo_ansible/roles/tripleo_image_serve/templates/image-serve.conf.j2
Kevin Carter 67ce344e30 Rename all roles that have a hyphen
All roles that have a hyphen in them need to be renamed to use an
underscore. This change creates a symlink to all roles using their
original name which will ensure we maintain compatibility with
the rest of the TripleO stack. This is being done because roles with
hyphens are no longer valid within collections.

A temp PBR update has been made to accomodate all of the symlinks to
the legacy role names.

[0] https://docs.ansible.com/ansible/devel/dev_guide/developing_collections.html#roles-directory

Change-Id: Id00a3670351990e5489a297c4c7200f8c05af096
Signed-off-by: Kevin Carter <kecarter@redhat.com>
2020-01-21 20:42:40 -06:00

32 lines
1.1 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>
</VirtualHost>