Commit 88d9a91d authored by Łukasz Nowak's avatar Łukasz Nowak Committed by Łukasz Nowak

apache-frontend: Drop _ from domain name

_ (underscore) is not supported by apache as domain name
(https://bugzilla.redhat.com/show_bug.cgi?id=1410130), so avoid using it.

/reviewed-on nexedi/slapos!320
parent 8ce7db6e
...@@ -27,7 +27,7 @@ md5sum = c55506cfb92d87f915d50d32fb129a28 ...@@ -27,7 +27,7 @@ md5sum = c55506cfb92d87f915d50d32fb129a28
[template-slave-list] [template-slave-list]
filename = templates/apache-custom-slave-list.cfg.in filename = templates/apache-custom-slave-list.cfg.in
md5sum = 4010f7366262d00c33f9e7f53f63d42e md5sum = 24e514ad6f15859229db46f24a8cd280
[template-slave-configuration] [template-slave-configuration]
filename = templates/custom-virtualhost.conf.in filename = templates/custom-virtualhost.conf.in
...@@ -43,7 +43,7 @@ md5sum = a56045e7b53ff00ab34d2a8f911fc1a1 ...@@ -43,7 +43,7 @@ md5sum = a56045e7b53ff00ab34d2a8f911fc1a1
[template-custom-slave-list] [template-custom-slave-list]
filename = templates/apache-custom-slave-list.cfg.in filename = templates/apache-custom-slave-list.cfg.in
md5sum = 4010f7366262d00c33f9e7f53f63d42e md5sum = 24e514ad6f15859229db46f24a8cd280
[template-not-found-html] [template-not-found-html]
filename = templates/notfound.html filename = templates/notfound.html
......
...@@ -81,7 +81,7 @@ crl = {{ custom_ssl_directory }}/crl/ ...@@ -81,7 +81,7 @@ crl = {{ custom_ssl_directory }}/crl/
{# Set slave domain if none was defined #} {# Set slave domain if none was defined #}
{% if slave_instance.get('custom_domain', None) == None -%} {% if slave_instance.get('custom_domain', None) == None -%}
{% set domain_prefix = slave_instance.get('slave_reference').replace("-", "").lower() -%} {% set domain_prefix = slave_instance.get('slave_reference').replace("-", "").replace("_", "").lower() -%}
{% if slave_type in NGINX_TYPE_LIST -%} {% if slave_type in NGINX_TYPE_LIST -%}
{% do slave_instance.__setitem__('custom_domain', "%s.%s" % (domain_prefix, slapparameter_dict.get('nginx-domain', slapparameter_dict.get('domain')))) -%} {% do slave_instance.__setitem__('custom_domain', "%s.%s" % (domain_prefix, slapparameter_dict.get('nginx-domain', slapparameter_dict.get('domain')))) -%}
{% else -%} {% else -%}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment