# <%= servername %> <%- unless ssl_mode.to_s == 'only' then -%> Include include.d/defaults.inc ServerName <%= servername %> <%- unless serveralias.to_s.empty? then -%> ServerAlias <%= serveralias %> <%- end -%> <%- unless server_admin.to_s.empty? or server_admin.to_s == 'absent' then -%> ServerAdmin <%= server_admin %> <%- end -%> <%= scope.function_template('apache/vhosts/partials/logs.erb') %> <%- if ssl_mode.to_s == 'force' then -%> RewriteEngine On RewriteCond %{HTTPS} !=on RewriteRule (.*) https://%{SERVER_NAME}$1 [R=permanent,L] <% else -%> Order deny,allow Allow from all <%= scope.function_template('apache/vhosts/partials/authentication.erb') %> ProxyRequests Off ProxyPass / <%= options %>/ ProxyPassReverse / <%= options %>/ <%- end -%> <%= scope.function_template('apache/vhosts/partials/mod_security.erb') %> <%- unless additional_options.to_s == 'absent' then -%> <%= additional_options %> <%- end -%> <%- end -%> <%- unless ssl_mode.to_s == 'false' then -%> Include include.d/defaults.inc Include include.d/ssl_defaults.inc ServerName <%= servername %> <%- unless serveralias.to_s.empty? then -%> ServerAlias <%= serveralias %> <%- end -%> <%- unless server_admin.to_s.empty? or server_admin.to_s == 'absent' then -%> ServerAdmin <%= server_admin %> <%- end -%> <%= scope.function_template('apache/vhosts/partials/logs.erb') %> <%= scope.function_template('apache/vhosts/partials/mod_security.erb') %> Order deny,allow Allow from all <%= scope.function_template('apache/vhosts/partials/authentication.erb') %> ProxyRequests Off ProxyPass / <%= options %>/ ProxyPassReverse / <%= options %>/ <%- unless additional_options.to_s == 'absent' then -%> <%= additional_options %> <%- end -%> <%- end -%>