Commit d80a3e73 authored by Jérome Perrin's avatar Jérome Perrin

apache back

parent 8e162bdd
...@@ -55,8 +55,8 @@ ...@@ -55,8 +55,8 @@
# # This is a Zope specific feature. # # This is a Zope specific feature.
# # `enable_authentication` has same meaning as for `backend-list`. # # `enable_authentication` has same meaning as for `backend-list`.
# "zope-virtualhost-monster-backend-dict": { # "zope-virtualhost-monster-backend-dict": {
# # {port: ( enable_authentication, {frontend_path: ( internal_scheme ) }, ) } # # {(ip, port): ( enable_authentication, {frontend_path: ( internal_scheme ) }, ) }
# 8004: ( # ('[::1]', 8004): (
# True, { # True, {
# 'zope-1': 'http://10.0.0.10:8001', # 'zope-1': 'http://10.0.0.10:8001',
# 'zope-2': 'http://10.0.0.10:8002', # 'zope-2': 'http://10.0.0.10:8002',
...@@ -75,11 +75,12 @@ ...@@ -75,11 +75,12 @@
# accepting requests from any client. # accepting requests from any client.
# #
# From zope-virtualhost-monster-backend-dict`: # From zope-virtualhost-monster-backend-dict`:
# - 0.0.0.0:8004 and [::1]:8004, with some path based rewrite-rules redirecting to: # - [::1]:8004 with some path based rewrite-rules redirecting to:
# * http://10.0.0.10/8001 when path matches /zope-1(.*) # * http://10.0.0.10/8001 when path matches /zope-1(.*)
# * http://10.0.0.10/8002 when path matches /zope-2(.*) # * http://10.0.0.10/8002 when path matches /zope-2(.*)
# with a visible name being the apache being accessed ( 0.0.0.0:8004 or [::1]:8004 ), # with some VirtualHostMonster rewrite rules so zope writes URLs with
# thanks to Zope's VirtualHostMonster as described on # [::1]:8004 as server name.
# For more details, refer to
# https://docs.zope.org/zope2/zope2book/VirtualHosting.html#using-virtualhostroot-and-virtualhostbase-together # https://docs.zope.org/zope2/zope2book/VirtualHosting.html#using-virtualhostroot-and-virtualhostbase-together
-#} -#}
LoadModule unixd_module modules/mod_unixd.so LoadModule unixd_module modules/mod_unixd.so
...@@ -179,12 +180,11 @@ Listen {{ ip }}:{{ port }} ...@@ -179,12 +180,11 @@ Listen {{ ip }}:{{ port }}
{% endfor -%} {% endfor -%}
{% for port, (enable_authentication, path_mapping) in parameter_dict.get('zope-virtualhost-monster-backend-dict', {}).items() -%} {% for (ip, port), (enable_authentication, path_mapping) in parameter_dict.get('zope-virtualhost-monster-backend-dict', {}).items() -%}
{% for ip in parameter_dict['ip-list'] -%}
Listen {{ ip }}:{{ port }} Listen {{ ip }}:{{ port }}
<VirtualHost {{ ip }}:{{ port }}> <VirtualHost {{ ip }}:{{ port }}>
SSLEngine on SSLEngine on
{% if enable_authentication and parameter_dict['ca-cert'] and parameter_dict['crl'] -%} {% if enable_authentication and parameter_dict['ca-cert'] and parameter_dict['crl'] -%}
SSLVerifyClient require SSLVerifyClient require
SSLCACertificateFile {{ parameter_dict['ca-cert'] }} SSLCACertificateFile {{ parameter_dict['ca-cert'] }}
SSLCARevocationCheck chain SSLCARevocationCheck chain
...@@ -196,11 +196,10 @@ Listen {{ ip }}:{{ port }} ...@@ -196,11 +196,10 @@ Listen {{ ip }}:{{ port }}
# XXX filename ? is it log-rotated ? # XXX filename ? is it log-rotated ?
ErrorLog "{{ parameter_dict['log-dir'] }}/apache-service-virtual-host-error.log" ErrorLog "{{ parameter_dict['log-dir'] }}/apache-service-virtual-host-error.log"
CustomLog "{{ parameter_dict['log-dir'] }}/apache-service-virtual-host-access.log" combined CustomLog "{{ parameter_dict['log-dir'] }}/apache-service-virtual-host-access.log" combined
{% endif -%} {% endif -%}
{% for path, backend in path_mapping.items() %} {% for path, backend in path_mapping.items() %}
RewriteRule ^/{{path}}(.*) {{ backend }}/VirtualHostBase/https/{{ ip }}:{{ port }}/VirtualHostRoot/_vh_{{ path }}$1 [L,P] RewriteRule ^/{{path}}(.*) {{ backend }}/VirtualHostBase/https/{{ ip }}:{{ port }}/VirtualHostRoot/_vh_{{ path }}$1 [L,P]
{% endfor -%}
</VirtualHost>
{% endfor -%} {% endfor -%}
</VirtualHost>
{% endfor -%} {% endfor -%}
\ No newline at end of file
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