summaryrefslogtreecommitdiff
path: root/templates/vhosts/itk_plus/partial.erb
blob: e37e418a16bea6c6be10f83f7e987914d4c62480 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32

    ProxyPreserveHost On
    ProxyRequests off
<% if vhost_part == :ssl -%>
    SSLProxyEngine On
    <%- if run_mode.to_s == 'static-itk' -%>
    ProxyPassMatch ^/(.*\.<%= passing_extension %>/?.*)$ https://127.0.0.1/$1
    <%- else -%>
    ProxyPass / https://127.0.0.1/
    <%- end -%>
    ProxyPassReverse / https://127.0.0.1/
<% else -%>
    <% if run_mode.to_s == 'static-itk' -%>
    ProxyPassMatch ^/(.*\.<%= passing_extension %>/?.*)$ http://127.0.0.1/$1
    <% else -%>
    ProxyPass / http://127.0.0.1/
    <% end -%>
    ProxyPassReverse / http://127.0.0.1/
<% end %>

    <% if run_mode.to_s == 'static-itk' && (ssl_mode.to_s != 'force' || vhost_part == :ssl) -%>
    <Directory "<%= documentroot %>/">
        AllowOverride <%= allow_override %>
        <% if options.to_s != 'absent' or do_includes.to_s == 'true' then -%>
        Options <% unless options.to_s == 'absent' then -%><%= options %><% end -%><% if do_includes.to_s == 'true' and not options.include?('+Includes') then -%> +Includes<% end -%>

        <% end -%>
<%= scope.function_template('apache/vhosts/partials/authentication.erb') %>
    </Directory>
    <% end -%>