diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2015-11-03 16:59:07 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2015-11-03 16:59:07 -0200 |
commit | b1bf78c8af695cc306fe8051eec4dc956f1eb826 (patch) | |
tree | 123abc7e8346317efcc5913b7af0859045df722c /templates | |
parent | c5f141db8cd3961ba2d62763dd1d0975ed8f6956 (diff) | |
download | puppet-apache-b1bf78c8af695cc306fe8051eec4dc956f1eb826.tar.gz puppet-apache-b1bf78c8af695cc306fe8051eec4dc956f1eb826.tar.bz2 |
Fix template deprecations
Diffstat (limited to 'templates')
-rw-r--r-- | templates/apache2.conf.jessie.erb | 8 | ||||
-rw-r--r-- | templates/apache2.conf.trusty.erb | 8 | ||||
-rw-r--r-- | templates/apache2.conf.wheezy.erb | 8 | ||||
-rw-r--r-- | templates/default.erb | 4 | ||||
-rw-r--r-- | templates/error.erb | 4 | ||||
-rw-r--r-- | templates/site.erb | 78 |
6 files changed, 55 insertions, 55 deletions
diff --git a/templates/apache2.conf.jessie.erb b/templates/apache2.conf.jessie.erb index 0fc143b..b68f822 100644 --- a/templates/apache2.conf.jessie.erb +++ b/templates/apache2.conf.jessie.erb @@ -35,7 +35,7 @@ # such as the number of concurrent requests it can handle or where it # can find its configuration files. # -ServerName <%= scope.lookupvar('apache::server_name') %>.<%= domain %> +ServerName <%= scope.lookupvar('apache::server_name') %>.<%= @domain %> # # ServerRoot: The top of the directory tree under which the server's @@ -123,8 +123,8 @@ KeepAliveTimeout 15 MaxRequestsPerChild 0 </IfModule> -User <%= default_user %> -Group <%= default_group %> +User <%= @default_user %> +Group <%= @default_group %> # # AccessFileName: The name of the file to look for in each directory @@ -455,7 +455,7 @@ ServerSignature Off #ErrorDocument 404 "/cgi-bin/missing_handler.pl" #ErrorDocument 402 http://www.example.com/subscription_info.html # -ErrorDocument 404 http://<%= domain %>/missing.html +ErrorDocument 404 http://<%= @domain %>/missing.html # # Putting this all together, we can internationalize error responses. diff --git a/templates/apache2.conf.trusty.erb b/templates/apache2.conf.trusty.erb index 0fc143b..b68f822 100644 --- a/templates/apache2.conf.trusty.erb +++ b/templates/apache2.conf.trusty.erb @@ -35,7 +35,7 @@ # such as the number of concurrent requests it can handle or where it # can find its configuration files. # -ServerName <%= scope.lookupvar('apache::server_name') %>.<%= domain %> +ServerName <%= scope.lookupvar('apache::server_name') %>.<%= @domain %> # # ServerRoot: The top of the directory tree under which the server's @@ -123,8 +123,8 @@ KeepAliveTimeout 15 MaxRequestsPerChild 0 </IfModule> -User <%= default_user %> -Group <%= default_group %> +User <%= @default_user %> +Group <%= @default_group %> # # AccessFileName: The name of the file to look for in each directory @@ -455,7 +455,7 @@ ServerSignature Off #ErrorDocument 404 "/cgi-bin/missing_handler.pl" #ErrorDocument 402 http://www.example.com/subscription_info.html # -ErrorDocument 404 http://<%= domain %>/missing.html +ErrorDocument 404 http://<%= @domain %>/missing.html # # Putting this all together, we can internationalize error responses. diff --git a/templates/apache2.conf.wheezy.erb b/templates/apache2.conf.wheezy.erb index 886b305..13c4797 100644 --- a/templates/apache2.conf.wheezy.erb +++ b/templates/apache2.conf.wheezy.erb @@ -35,7 +35,7 @@ # such as the number of concurrent requests it can handle or where it # can find its configuration files. # -ServerName <%= scope.lookupvar('apache::server_name') %>.<%= domain %> +ServerName <%= scope.lookupvar('apache::server_name') %>.<%= @domain %> # # ServerRoot: The top of the directory tree under which the server's @@ -123,8 +123,8 @@ KeepAliveTimeout 15 MaxRequestsPerChild 0 </IfModule> -User <%= default_user %> -Group <%= default_group %> +User <%= @default_user %> +Group <%= @default_group %> # # AccessFileName: The name of the file to look for in each directory @@ -455,7 +455,7 @@ ServerSignature Off #ErrorDocument 404 "/cgi-bin/missing_handler.pl" #ErrorDocument 402 http://www.example.com/subscription_info.html # -ErrorDocument 404 http://<%= domain %>/missing.html +ErrorDocument 404 http://<%= @domain %>/missing.html # # Putting this all together, we can internationalize error responses. diff --git a/templates/default.erb b/templates/default.erb index 90e4801..b2af2e7 100644 --- a/templates/default.erb +++ b/templates/default.erb @@ -1,4 +1,4 @@ -# begin vhost for <%= fqdn %> +# begin vhost for <%= @fqdn %> <VirtualHost *:<%= scope.lookupvar('apache::http_port') %>> ServerName <%= fqdn %> DocumentRoot <%= scope.lookupvar('apache::default_folder') %> @@ -11,4 +11,4 @@ # end site config </VirtualHost> -# end vhost for <%= fqdn %> +# end vhost for <%= @fqdn %> diff --git a/templates/error.erb b/templates/error.erb index 4e13d60..27a2c8e 100644 --- a/templates/error.erb +++ b/templates/error.erb @@ -1,7 +1,7 @@ # vhost to handle inexistent vhosts <VirtualHost *:<%= scope.lookupvar('apache::http_port') %>> - ServerName error.<%= hosting_domain %> - ServerAlias *.<%= hosting_domain %> + ServerName error.<%= @hosting_domain %> + ServerAlias *.<%= @hosting_domain %> DocumentRoot <%= scope.lookupvar('apache::error_folder') %> ErrorDocument 404 <%= scope.lookupvar('apache::error_dest') %> diff --git a/templates/site.erb b/templates/site.erb index dd6c243..e2ebbf5 100644 --- a/templates/site.erb +++ b/templates/site.erb @@ -1,63 +1,63 @@ -# begin vhost for <%= title %> -<VirtualHost <%= listen %>:<%= scope.lookupvar('apache::http_port') %>> - ServerName <%= title %>.<%= hosting_domain %> -<% if server_alias != false %> ServerAlias <%= server_alias %><% end %> - DocumentRoot <%= docroot %> -<% if https_redirect != false or canonical != false %> +# begin vhost for <%= @title %> +<VirtualHost <%= @listen %>:<%= scope.lookupvar('apache::http_port') %>> + ServerName <%= @title %>.<%= @hosting_domain %> +<% if @server_alias != false %> ServerAlias <%= @server_alias %><% end %> + DocumentRoot <%= @docroot %> +<% if @https_redirect != false or @canonical != false %> RewriteEngine On <% end -%> -<% if https_redirect != false %> +<% if @https_redirect != false %> # Redirect all HTTP to HTTPS RewriteRule ^(.*)$ https://%{HTTP_HOST}$1 [redirect=301]<% end %> -<% if redirect_match != false %> RedirectMatch ^/$ <%= protocol %>://<%= title %>.<%= hosting_domain %>/<%= redirect_match %><% end %> -<% if redirect != false %> Redirect <%= redirect %><% end %> -<% if aliases != false %><% aliases.each do |map| -%> +<% if @redirect_match != false %> RedirectMatch ^/$ <%= @protocol %>://<%= @title %>.<%= @hosting_domain %>/<%= @redirect_match %><% end %> +<% if @redirect != false %> Redirect <%= @redirect %><% end %> +<% if @aliases != false %><% @aliases.each do |map| -%> Alias <%= map %> <% end -%><% end -%> -<% if use != false %><% use.each do |instance| -%> +<% if @use != false %><% @use.each do |instance| -%> Use <%= instance %> <% end -%><% end -%> -<% if mpm == true %> +<% if @mpm == true %> <IfModule mpm_itk_module> - AssignUserId <%= user %> <%= gid %> + AssignUserId <%= @user %> <%= @gid %> </IfModule> <% end %> -<% if canonical != false %> - <%- for canonical_exception in canonical_exceptions -%> +<% if @canonical != false %> + <%- for canonical_exception in @canonical_exceptions -%> RewriteCond %{HTTP_HOST} !=<%= canonical_exception %> [NC] <%- end -%> - RewriteCond %{HTTP_HOST} !=<%= canonical %> [NC] + RewriteCond %{HTTP_HOST} !=<%= @canonical %> [NC] RewriteCond %{HTTP_HOST} !="" - RewriteRule ^/(.*) <%= protocol %>://<%= canonical %>/$1 [L,R=301] + RewriteRule ^/(.*) <%= @protocol %>://<%= @canonical %>/$1 [L,R=301] <% end %> -<% if custom_directives != false -%> - <%= custom_directives %> +<% if @custom_directives != false -%> + <%= @custom_directives %> <% end -%> </VirtualHost> -# end vhost for <%= title %> -<% if ssl == true %> -# begin ssl vhost for <%= title %> -<VirtualHost <%= listen %>:<%= scope.lookupvar('apache::https_port') %>> +# end vhost for <%= @title %> +<% if @ssl == true %> +# begin ssl vhost for <%= @title %> +<VirtualHost <%= @listen %>:<%= scope.lookupvar('apache::https_port') %>> # Use HTTP Strict Transport Security to force client to use secure connections only Header always set Strict-Transport-Security "max-age=15768000; includeSubDomains" - ServerName <%= title %>.<%= hosting_domain %> -<% if server_alias != false %> ServerAlias <%= server_alias %><% end %> - DocumentRoot <%= docroot %> -<% if redirect_match != false %> RedirectMatch ^/$ <%= protocol %>://<%= title %>.<%= hosting_domain %>/<%= redirect_match %><% end %> -<% if redirect != false %> Redirect <%= redirect %><% end %> -<% if aliases != false %><% aliases.each do |map| -%> - Alias <%= map %> + ServerName <%= @title %>.<%= @hosting_domain %> +<% if @server_alias != false %> ServerAlias <%= @server_alias %><% end %> + DocumentRoot <%= @docroot %> +<% if @redirect_match != false %> RedirectMatch ^/$ <%= @protocol %>://<%= @title %>.<%= @hosting_domain %>/<%= @redirect_match %><% end %> +<% if @redirect != false %> Redirect <%= @redirect %><% end %> +<% if @aliases != false %><% aliases.each do |map| -%> + Alias <%= @map %> <% end -%><% end -%> -<% if use != false %><% use.each do |instance| -%> +<% if @use != false %><% @use.each do |instance| -%> Use <%= instance %> <% end -%><% end -%> -<% if custom_directives != false -%> - <%= custom_directives %> +<% if @custom_directives != false -%> + <%= @custom_directives %> <% end -%> -<% if mpm == true %> +<% if @mpm == true %> <IfModule mpm_itk_module> - AssignUserId <%= user %> <%= gid %> + AssignUserId <%= @user %> <%= @gid %> </IfModule> <% end %> # SSL Configuration @@ -66,8 +66,8 @@ SSLCipherSuite ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:!RC4:HIGH:!MD5:!aNULL:!EDH SSLHonorCipherOrder on SSLCompression off - SSLCertificateFile /etc/ssl/certs/<%= title %>.crt - SSLCertificateKeyFile /etc/ssl/private/<%= title %>.pem + SSLCertificateFile /etc/ssl/certs/<%= @title %>.crt + SSLCertificateKeyFile /etc/ssl/private/<%= @title %>.pem </VirtualHost> -# end ssl vhost for <%= title %> -<% end %> +# end ssl vhost for <%= @title %> +<% end %> |