diff --git a/Ansible/ansible_collections/jfrog/platform/roles/artifactory_nginx_ssl/templates/artifactory.conf.j2 b/Ansible/ansible_collections/jfrog/platform/roles/artifactory_nginx_ssl/templates/artifactory.conf.j2 index 4d3976ee..5a0e189f 100644 --- a/Ansible/ansible_collections/jfrog/platform/roles/artifactory_nginx_ssl/templates/artifactory.conf.j2 +++ b/Ansible/ansible_collections/jfrog/platform/roles/artifactory_nginx_ssl/templates/artifactory.conf.j2 @@ -18,7 +18,11 @@ ## server configuration server { listen 443 ssl http2; +{% if artifactory_docker_registry_subdomain %} + server_name ~(?.+)\.{{ server_name }}; +{% else %} server_name {{ server_name }}; +{% endif %} if ($http_x_forwarded_proto = '') { set $http_x_forwarded_proto $scheme; } @@ -47,4 +51,4 @@ proxy_pass http://artifactory-direct; } } -} \ No newline at end of file +}