Commit c0cf313e authored by Cédric Le Ninivin's avatar Cédric Le Ninivin

apache-frontend: Use domain instead of server_name

parent f05d5828
......@@ -56,8 +56,8 @@ apache_custom_https = {{ dumps(apache_custom_https) }}
{{ '\n' }}
# The slave use cache
{% if 'enable_cache' in slave_instance and 'url' in slave_instance and 'server_name' in slave_instance -%}
{% do cached_server_dict.__setitem__(slave_instance.get('server_name'), slave_instance.get('url')) -%}
{% if 'enable_cache' in slave_instance and 'url' in slave_instance and 'domain' in slave_instance -%}
{% do cached_server_dict.__setitem__(slave_instance.get('domain'), slave_instance.get('url')) -%}
{% endif -%}
{% endfor -%}
......
......@@ -14,12 +14,12 @@ context =
{% set slave_reference = slave_instance.get('slave_reference') -%}
{% set slave_section_title = 'dynamic-template-slave-instance-%s' % slave_reference -%}
{% set slave_parameter_dict = generic_instance_parameter_dict.copy() -%}
{% if slave_instance.get('server_name', None) == None -%}
{% do slave_instance.__setitem__('server_name', "%s.%s" % (slave_instance.get('slave_reference').replace("-", "").lower(), domain)) -%}
{% if slave_instance.get('domain', None) == None -%}
{% do slave_instance.__setitem__('domain', "%s.%s" % (slave_instance.get('slave_reference').replace("-", "").lower(), domain)) -%}
{% endif -%}
{% if 'enable_cache' in slave_instance -%}
# The slave use cache
{% do cached_server_dict.__setitem__(slave_instance.get('server_name'), slave_instance.get('url')) -%}
{% do cached_server_dict.__setitem__(slave_instance.get('domain'), slave_instance.get('url')) -%}
{% endif -%}
{% do slave_instance.__setitem__('url', cache_access) -%}
{% do part_list.append(slave_section_title) -%}
......
......@@ -3,7 +3,7 @@
# Basic server configuration
PidFile "{{ pid_file }}"
ServerName {{ server_name }}
ServerName {{ domain }}
DocumentRoot {{ document_root }}
ServerRoot {{ instance_home }}
......
......@@ -3,7 +3,7 @@
# Basic server configuration
PidFile "{{ pid_file }}"
ServerName {{ server_name }}
ServerName {{ domain }}
DocumentRoot {{ document_root }}
ServerRoot {{ instance_home }}
......
......@@ -155,7 +155,7 @@ rendered = $${apache-configuration:frontend-configuration}
extra-context =
raw httpd_home ${apache-2.2:location}
key httpd_mod_ssl_cache_directory apache-directory:mod-ssl
key server_name instance-parameter:configuration.domain
key domain instance-parameter:configuration.domain
key document_root apache-directory:document-root
key instance_home buildout:directory
key ipv4_addr instance-parameter:ipv4-random
......@@ -190,7 +190,7 @@ rendered = $${apache-configuration:cached-configuration}
extra-context =
raw httpd_home ${apache-2.2:location}
key httpd_mod_ssl_cache_directory apache-directory:mod-ssl
key server_name instance-parameter:configuration.domain
key domain instance-parameter:configuration.domain
key document_root apache-directory:document-root
key instance_home buildout:directory
key ipv4_addr instance-parameter:ipv4-random
......
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