summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2011-05-17 23:30:11 +0200
committermh <mh@immerda.ch>2011-05-17 23:30:11 +0200
commit09feb96edeaff10bde462aabb8c4d0c961eadd1a (patch)
tree07961b935baa987c667b5a217d7c067591b0ed31 /templates
parente6819524ebf02302d05d74d8c92f4c3dd90c06b4 (diff)
migrate authentication to partials
Diffstat (limited to 'templates')
-rw-r--r--templates/vhosts/gitweb/gitweb.erb14
-rw-r--r--templates/vhosts/partials/authentication.erb4
-rw-r--r--templates/vhosts/perl/perl.erb28
-rw-r--r--templates/vhosts/php/php.erb28
-rw-r--r--templates/vhosts/php_drupal/php_drupal.erb28
-rw-r--r--templates/vhosts/php_gallery2/php_gallery2.erb28
-rw-r--r--templates/vhosts/php_joomla/php_joomla.erb28
-rw-r--r--templates/vhosts/php_mediawiki/php_mediawiki.erb28
-rw-r--r--templates/vhosts/php_silverstripe/php_silverstripe.erb28
-rw-r--r--templates/vhosts/php_simplemachine/php_simplemachine.erb28
-rw-r--r--templates/vhosts/php_spip/php_spip.erb28
-rw-r--r--templates/vhosts/php_typo3/php_typo3.erb28
-rw-r--r--templates/vhosts/php_wordpress/php_wordpress.erb28
-rw-r--r--templates/vhosts/proxy/proxy.erb14
-rw-r--r--templates/vhosts/static/static.erb16
-rw-r--r--templates/vhosts/webdav/webdav.erb14
16 files changed, 54 insertions, 316 deletions
diff --git a/templates/vhosts/gitweb/gitweb.erb b/templates/vhosts/gitweb/gitweb.erb
index 61ce15f..5bcfeb5 100644
--- a/templates/vhosts/gitweb/gitweb.erb
+++ b/templates/vhosts/gitweb/gitweb.erb
@@ -38,12 +38,7 @@
RewriteEngine on
RewriteRule ^[a-zA-Z0-9_-]+.git/?(\?.)?$ /gitweb.cgi%{REQUESTURI} [L,PT]
- <%- unless htpasswd_file.to_s == 'absent' then -%>
- AuthType Basic
- AuthName "Access fuer <%= servername %>"
- AuthUserFile <%= real_htpasswd_path %>
- require valid-user
- <%- end -%>
+<%= scope.function_template('apache/vhosts/partials/authentication.erb') %>
</Directory>
<%- end -%>
@@ -92,12 +87,7 @@
RewriteEngine on
RewriteRule ^[a-zA-Z0-9_-]+.git/?(\?.)?$ /gitweb.cgi%{REQUESTURI} [L,PT]
- <%- unless htpasswd_file.to_s == 'absent' then -%>
- AuthType Basic
- AuthName "Access fuer <%= servername %>"
- AuthUserFile <%= real_htpasswd_path %>
- require valid-user
- <%- end -%>
+<%= scope.function_template('apache/vhosts/partials/authentication.erb') %>
</Directory>
<%- end %>
diff --git a/templates/vhosts/partials/authentication.erb b/templates/vhosts/partials/authentication.erb
index b038eb6..6ca1b03 100644
--- a/templates/vhosts/partials/authentication.erb
+++ b/templates/vhosts/partials/authentication.erb
@@ -1,6 +1,6 @@
- <%- unless htpasswd_file.to_s == 'absent' -%>
+<% unless htpasswd_file.to_s == 'absent' -%>
AuthType Basic
AuthName "Access fuer <%= servername %>"
AuthUserFile <%= real_htpasswd_path %>
require valid-user
- <%- end -%> \ No newline at end of file
+<% end -%> \ No newline at end of file
diff --git a/templates/vhosts/perl/perl.erb b/templates/vhosts/perl/perl.erb
index 61bc179..1b49d62 100644
--- a/templates/vhosts/perl/perl.erb
+++ b/templates/vhosts/perl/perl.erb
@@ -40,12 +40,7 @@
Options <%- unless options.to_s == 'absent' then -%><%= options %><%- end -%><%- if do_includes.to_s == 'true' and not options.include?('+Includes') then -%> +Includes<%- end -%>
<%- end -%>
- <%- unless htpasswd_file.to_s == 'absent' then -%>
- AuthType Basic
- AuthName "Access fuer <%= servername %>"
- AuthUserFile <%= real_htpasswd_path %>
- require valid-user
- <%- end -%>
+<%= scope.function_template('apache/vhosts/partials/authentication.erb') %>
</Directory>
<%- unless htpasswd_file.to_s == 'absent' then -%>
@@ -103,12 +98,7 @@
Options <%- unless options.to_s == 'absent' then -%><%= options %><%- end -%><%- if do_includes.to_s == 'true' and not options.include?('+Includes') then -%> +Includes<%- end -%>
<%- end -%>
- <%- unless htpasswd_file.to_s == 'absent' then -%>
- AuthType Basic
- AuthName "Access fuer <%= servername %>"
- AuthUserFile <%= real_htpasswd_path %>
- require valid-user
- <%- end -%>
+<%= scope.function_template('apache/vhosts/partials/authentication.erb') %>
</Directory>
ScriptAlias /cgi-bin/ <%= cgi_binpath %>/
@@ -179,12 +169,7 @@
Options <%- unless options.to_s == 'absent' then -%><%= options %><%- end -%><%- if do_includes.to_s == 'true' and not options.include?('+Includes') then -%> +Includes<%- end -%>
<%- end -%>
- <%- unless htpasswd_file.to_s == 'absent' then -%>
- AuthType Basic
- AuthName "Access fuer <%= servername %>"
- AuthUserFile <%= real_htpasswd_path %>
- require valid-user
- <%- end -%>
+<%= scope.function_template('apache/vhosts/partials/authentication.erb') %>
</Directory>
<%- unless htpasswd_file.to_s == 'absent' then -%>
@@ -249,12 +234,7 @@
Options <%- unless options.to_s == 'absent' then -%><%= options %><%- end -%><%- if do_includes.to_s == 'true' and not options.include?('+Includes') then -%> +Includes<%- end -%>
<%- end -%>
- <%- unless htpasswd_file.to_s == 'absent' then -%>
- AuthType Basic
- AuthName "Access fuer <%= servername %>"
- AuthUserFile <%= real_htpasswd_path %>
- require valid-user
- <%- end -%>
+<%= scope.function_template('apache/vhosts/partials/authentication.erb') %>
</Directory>
<%- if htpasswd_file.to_s == 'absent' then -%>
diff --git a/templates/vhosts/php/php.erb b/templates/vhosts/php/php.erb
index 4531d9f..ae70a00 100644
--- a/templates/vhosts/php/php.erb
+++ b/templates/vhosts/php/php.erb
@@ -40,12 +40,7 @@
Options <%- unless options.to_s == 'absent' then -%><%= options %><%- end -%><%- if do_includes.to_s == 'true' and not options.include?('+Includes') then -%> +Includes<%- end -%>
<%- end -%>
- <%- unless htpasswd_file.to_s == 'absent' then -%>
- AuthType Basic
- AuthName "Access fuer <%= servername %>"
- AuthUserFile <%= real_htpasswd_path %>
- require valid-user
- <%- end -%>
+<%= scope.function_template('apache/vhosts/partials/authentication.erb') %>
php_admin_flag engine on
<%- if php_safe_mode.to_s == 'false' -%>
php_admin_flag safe_mode Off
@@ -106,12 +101,7 @@
Options <%- unless options.to_s == 'absent' then -%><%= options %><%- end -%><%- if do_includes.to_s == 'true' and not options.include?('+Includes') then -%> +Includes<%- end -%>
<%- end -%>
- <%- unless htpasswd_file.to_s == 'absent' then -%>
- AuthType Basic
- AuthName "Access fuer <%= servername %>"
- AuthUserFile <%= real_htpasswd_path %>
- require valid-user
- <%- end -%>
+<%= scope.function_template('apache/vhosts/partials/authentication.erb') %>
php_admin_flag engine on
<%- if php_safe_mode.to_s == 'false' -%>
php_admin_flag safe_mode Off
@@ -184,12 +174,7 @@
Options <%- unless options.to_s == 'absent' then -%><%= options %><%- end -%><%- if do_includes.to_s == 'true' and not options.include?('+Includes') then -%> +Includes<%- end -%>
<%- end -%>
- <%- unless htpasswd_file.to_s == 'absent' then -%>
- AuthType Basic
- AuthName "Access fuer <%= servername %>"
- AuthUserFile <%= real_htpasswd_path %>
- require valid-user
- <%- end -%>
+<%= scope.function_template('apache/vhosts/partials/authentication.erb') %>
</Directory>
<%- end -%>
<%- end -%>
@@ -244,12 +229,7 @@
Options <%- unless options.to_s == 'absent' then -%><%= options %><%- end -%><%- if do_includes.to_s == 'true' and not options.include?('+Includes') then -%> +Includes<%- end -%>
<%- end -%>
- <%- unless htpasswd_file.to_s == 'absent' then -%>
- AuthType Basic
- AuthName "Access fuer <%= servername %>"
- AuthUserFile <%= real_htpasswd_path %>
- require valid-user
- <%- end -%>
+<%= scope.function_template('apache/vhosts/partials/authentication.erb') %>
</Directory>
<%- end -%>
diff --git a/templates/vhosts/php_drupal/php_drupal.erb b/templates/vhosts/php_drupal/php_drupal.erb
index 01ba2fb..7300695 100644
--- a/templates/vhosts/php_drupal/php_drupal.erb
+++ b/templates/vhosts/php_drupal/php_drupal.erb
@@ -39,12 +39,7 @@
Options <%- unless options.to_s == 'absent' then -%><%= options %><%- end -%><%- if do_includes.to_s == 'true' and not options.include?('+Includes') then -%> +Includes<%- end -%>
<%- end -%>
- <%- unless htpasswd_file.to_s == 'absent' then -%>
- AuthType Basic
- AuthName "Access fuer <%= servername %>"
- AuthUserFile <%= real_htpasswd_path %>
- require valid-user
- <%- end -%>
+<%= scope.function_template('apache/vhosts/partials/authentication.erb') %>
php_admin_flag engine on
<%- unless php_default_charset.to_s == 'absent' then -%>
php_admin_value default_charset <%= php_default_charset %>
@@ -127,12 +122,7 @@
Options <%- unless options.to_s == 'absent' then -%><%= options %><%- end -%><%- if do_includes.to_s == 'true' and not options.include?('+Includes') then -%> +Includes<%- end -%>
<%- end -%>
- <%- unless htpasswd_file.to_s == 'absent' then -%>
- AuthType Basic
- AuthName "Access fuer <%= servername %>"
- AuthUserFile <%= real_htpasswd_path %>
- require valid-user
- <%- end -%>
+<%= scope.function_template('apache/vhosts/partials/authentication.erb') %>
php_admin_flag engine on
<%- unless php_default_charset.to_s == 'absent' then -%>
php_admin_value default_charset <%= php_default_charset %>
@@ -228,12 +218,7 @@
Options <%- unless options.to_s == 'absent' then -%><%= options %><%- end -%><%- if do_includes.to_s == 'true' and not options.include?('+Includes') then -%> +Includes<%- end -%>
<%- end -%>
- <%- unless htpasswd_file.to_s == 'absent' then -%>
- AuthType Basic
- AuthName "Access fuer <%= servername %>"
- AuthUserFile <%= real_htpasswd_path %>
- require valid-user
- <%- end -%>
+<%= scope.function_template('apache/vhosts/partials/authentication.erb') %>
# Protect files and directories from prying eyes.
<FilesMatch "\.(engine|inc|info|install|module|profile|po|sh|.*sql|theme|tpl(\.php)?|xtmpl)$|^(code-style\.pl|Entries.*|Repository|Root|Tag|Template)$">
@@ -306,12 +291,7 @@
Options <%- unless options.to_s == 'absent' then -%><%= options %><%- end -%><%- if do_includes.to_s == 'true' and not options.include?('+Includes') then -%> +Includes<%- end -%>
<%- end -%>
- <%- unless htpasswd_file.to_s == 'absent' then -%>
- AuthType Basic
- AuthName "Access fuer <%= servername %>"
- AuthUserFile <%= real_htpasswd_path %>
- require valid-user
- <%- end -%>
+<%= scope.function_template('apache/vhosts/partials/authentication.erb') %>
# Protect files and directories from prying eyes.
<FilesMatch "\.(engine|inc|info|install|module|profile|po|sh|.*sql|theme|tpl(\.php)?|xtmpl)$|^(code-style\.pl|Entries.*|Repository|Root|Tag|Template)$">
diff --git a/templates/vhosts/php_gallery2/php_gallery2.erb b/templates/vhosts/php_gallery2/php_gallery2.erb
index db4068d..22d56ad 100644
--- a/templates/vhosts/php_gallery2/php_gallery2.erb
+++ b/templates/vhosts/php_gallery2/php_gallery2.erb
@@ -40,12 +40,7 @@
Options <%- unless options.to_s == 'absent' then -%><%= options %><%- end -%><%- if do_includes.to_s == 'true' and not options.include?('+Includes') then -%> +Includes<%- end -%>
<%- end -%>
- <%- unless htpasswd_file.to_s == 'absent' then -%>
- AuthType Basic
- AuthName "Access fuer <%= servername %>"
- AuthUserFile <%= real_htpasswd_path %>
- require valid-user
- <%- end -%>
+<%= scope.function_template('apache/vhosts/partials/authentication.erb') %>
php_admin_flag engine on
php_admin_flag safe_mode Off
php_admin_value output_buffering Off
@@ -114,12 +109,7 @@
Options <%- unless options.to_s == 'absent' then -%><%= options %><%- end -%><%- if do_includes.to_s == 'true' and not options.include?('+Includes') then -%> +Includes<%- end -%>
<%- end -%>
- <%- unless htpasswd_file.to_s == 'absent' then -%>
- AuthType Basic
- AuthName "Access fuer <%= servername %>"
- AuthUserFile <%= real_htpasswd_path %>
- require valid-user
- <%- end -%>
+<%= scope.function_template('apache/vhosts/partials/authentication.erb') %>
php_admin_flag engine on
php_admin_flag safe_mode Off
php_admin_value output_buffering Off
@@ -200,12 +190,7 @@
Options <%- unless options.to_s == 'absent' then -%><%= options %><%- end -%><%- if do_includes.to_s == 'true' and not options.include?('+Includes') then -%> +Includes<%- end -%>
<%- end -%>
- <%- unless htpasswd_file.to_s == 'absent' then -%>
- AuthType Basic
- AuthName "Access fuer <%= servername %>"
- AuthUserFile <%= real_htpasswd_path %>
- require valid-user
- <%- end -%>
+<%= scope.function_template('apache/vhosts/partials/authentication.erb') %>
# Always rewrite login's
# Source: http://gallery.menalto.com/node/30558
@@ -270,12 +255,7 @@
Options <%- unless options.to_s == 'absent' then -%><%= options %><%- end -%><%- if do_includes.to_s == 'true' and not options.include?('+Includes') then -%> +Includes<%- end -%>
<%- end -%>
- <%- unless htpasswd_file.to_s == 'absent' then -%>
- AuthType Basic
- AuthName "Access fuer <%= servername %>"
- AuthUserFile <%= real_htpasswd_path %>
- require valid-user
- <%- end -%>
+<%= scope.function_template('apache/vhosts/partials/authentication.erb') %>
# Always rewrite login's (see above)
RewriteEngine On
RewriteCond %{HTTP_COOKIE} =""
diff --git a/templates/vhosts/php_joomla/php_joomla.erb b/templates/vhosts/php_joomla/php_joomla.erb
index 09d1bda..dfb8136 100644
--- a/templates/vhosts/php_joomla/php_joomla.erb
+++ b/templates/vhosts/php_joomla/php_joomla.erb
@@ -42,12 +42,7 @@
Options <%- unless options.to_s == 'absent' then -%><%= options %><%- end -%><%- if do_includes.to_s == 'true' and not options.include?('+Includes') then -%> +Includes<%- end -%>
<%- end -%>
- <%- unless htpasswd_file.to_s == 'absent' then -%>
- AuthType Basic
- AuthName "Access fuer <%= servername %>"
- AuthUserFile <%= real_htpasswd_path %>
- require valid-user
- <%- end -%>
+<%= scope.function_template('apache/vhosts/partials/authentication.erb') %>
php_admin_flag engine on
<%- unless php_default_charset.to_s == 'absent' then -%>
php_admin_value default_charset <%= php_default_charset %>
@@ -118,12 +113,7 @@
Options <%- unless options.to_s == 'absent' then -%><%= options %><%- end -%><%- if do_includes.to_s == 'true' and not options.include?('+Includes') then -%> +Includes<%- end -%>
<%- end -%>
- <%- unless htpasswd_file.to_s == 'absent' then -%>
- AuthType Basic
- AuthName "Access fuer <%= servername %>"
- AuthUserFile <%= real_htpasswd_path %>
- require valid-user
- <%- end -%>
+<%= scope.function_template('apache/vhosts/partials/authentication.erb') %>
php_admin_flag engine on
<%- unless php_default_charset.to_s == 'absent' then -%>
php_admin_value default_charset <%= php_default_charset %>
@@ -195,12 +185,7 @@
Options <%- unless options.to_s == 'absent' then -%><%= options %><%- end -%><%- if do_includes.to_s == 'true' and not options.include?('+Includes') then -%> +Includes<%- end -%>
<%- end -%>
- <%- unless htpasswd_file.to_s == 'absent' then -%>
- AuthType Basic
- AuthName "Access fuer <%= servername %>"
- AuthUserFile <%= real_htpasswd_path %>
- require valid-user
- <%- end -%>
+<%= scope.function_template('apache/vhosts/partials/authentication.erb') %>
</Directory>
<Directory "<%= documentroot %>/administrator/">
RewriteEngine on
@@ -266,12 +251,7 @@
Options <%- unless options.to_s == 'absent' then -%><%= options %><%- end -%><%- if do_includes.to_s == 'true' and not options.include?('+Includes') then -%> +Includes<%- end -%>
<%- end -%>
- <%- unless htpasswd_file.to_s == 'absent' then -%>
- AuthType Basic
- AuthName "Access fuer <%= servername %>"
- AuthUserFile <%= real_htpasswd_path %>
- require valid-user
- <%- end -%>
+<%= scope.function_template('apache/vhosts/partials/authentication.erb') %>
</Directory>
<%- end -%>
diff --git a/templates/vhosts/php_mediawiki/php_mediawiki.erb b/templates/vhosts/php_mediawiki/php_mediawiki.erb
index b913c10..af0ae8c 100644
--- a/templates/vhosts/php_mediawiki/php_mediawiki.erb
+++ b/templates/vhosts/php_mediawiki/php_mediawiki.erb
@@ -40,12 +40,7 @@
Options <%- unless options.to_s == 'absent' then -%><%= options %><%- end -%><%- if do_includes.to_s == 'true' and not options.include?('+Includes') then -%> +Includes<%- end -%><%- unless options.to_s.include?('+FollowSymLinks') -%> +FollowSymLinks<% end -%>
<%- end -%>
- <%- unless htpasswd_file.to_s == 'absent' then -%>
- AuthType Basic
- AuthName "Access fuer <%= servername %>"
- AuthUserFile <%= real_htpasswd_path %>
- require valid-user
- <%- end -%>
+<%= scope.function_template('apache/vhosts/partials/authentication.erb') %>
php_admin_flag engine on
php_admin_value safe_mode off
<%- unless php_default_charset.to_s == 'absent' then -%>
@@ -102,12 +97,7 @@
Options <%- unless options.to_s == 'absent' then -%><%= options %><%- end -%><%- if do_includes.to_s == 'true' and not options.include?('+Includes') then -%> +Includes<%- end -%>
<%- end -%>
- <%- unless htpasswd_file.to_s == 'absent' then -%>
- AuthType Basic
- AuthName "Access fuer <%= servername %>"
- AuthUserFile <%= real_htpasswd_path %>
- require valid-user
- <%- end -%>
+<%= scope.function_template('apache/vhosts/partials/authentication.erb') %>
php_admin_flag engine on
php_admin_value safe_mode off
<%- unless php_default_charset.to_s == 'absent' then -%>
@@ -175,12 +165,7 @@
Options <%- unless options.to_s == 'absent' then -%><%= options %><%- end -%><%- if do_includes.to_s == 'true' and not options.include?('+Includes') then -%> +Includes<%- end -%><%- unless options.to_s.include?('+FollowSymLinks') -%> +FollowSymLinks<% end -%>
<%- end -%>
- <%- unless htpasswd_file.to_s == 'absent' then -%>
- AuthType Basic
- AuthName "Access fuer <%= servername %>"
- AuthUserFile <%= real_htpasswd_path %>
- require valid-user
- <%- end -%>
+<%= scope.function_template('apache/vhosts/partials/authentication.erb') %>
</Directory>
<%- end -%>
<%- end -%>
@@ -237,12 +222,7 @@
Options <%- unless options.to_s == 'absent' then -%><%= options %><%- end -%><%- if do_includes.to_s == 'true' and not options.include?('+Includes') then -%> +Includes<%- end -%>
<%- end -%>
- <%- unless htpasswd_file.to_s == 'absent' then -%>
- AuthType Basic
- AuthName "Access fuer <%= servername %>"
- AuthUserFile <%= real_htpasswd_path %>
- require valid-user
- <%- end -%>
+<%= scope.function_template('apache/vhosts/partials/authentication.erb') %>
</Directory>
<%- end -%>
diff --git a/templates/vhosts/php_silverstripe/php_silverstripe.erb b/templates/vhosts/php_silverstripe/php_silverstripe.erb
index 19f48d1..eaf944a 100644
--- a/templates/vhosts/php_silverstripe/php_silverstripe.erb
+++ b/templates/vhosts/php_silverstripe/php_silverstripe.erb
@@ -44,12 +44,7 @@
Options <%- unless options.to_s == 'absent' then -%><%= options %><%- end -%><%- if do_includes.to_s == 'true' and not options.include?('+Includes') then -%> +Includes<%- end -%>
<%- end -%>
- <%- unless htpasswd_file.to_s == 'absent' then -%>
- AuthType Basic
- AuthName "Access fuer <%= servername %>"
- AuthUserFile <%= real_htpasswd_path %>
- require valid-user
- <%- end -%>
+<%= scope.function_template('apache/vhosts/partials/authentication.erb') %>
php_admin_flag engine on
<%- unless php_default_charset.to_s == 'absent' then -%>
php_admin_value default_charset <%= php_default_charset %>
@@ -125,12 +120,7 @@
Options <%- unless options.to_s == 'absent' then -%><%= options %><%- end -%><%- if do_includes.to_s == 'true' and not options.include?('+Includes') then -%> +Includes<%- end -%>
<%- end -%>
- <%- unless htpasswd_file.to_s == 'absent' then -%>
- AuthType Basic
- AuthName "Access fuer <%= servername %>"
- AuthUserFile <%= real_htpasswd_path %>
- require valid-user
- <%- end -%>
+<%= scope.function_template('apache/vhosts/partials/authentication.erb') %>
php_admin_flag engine on
<%- unless php_default_charset.to_s == 'absent' then -%>
php_admin_value default_charset <%= php_default_charset %>
@@ -223,12 +213,7 @@
Options <%- unless options.to_s == 'absent' then -%><%= options %><%- end -%><%- if do_includes.to_s == 'true' and not options.include?('+Includes') then -%> +Includes<%- end -%>
<%- end -%>
- <%- unless htpasswd_file.to_s == 'absent' then -%>
- AuthType Basic
- AuthName "Access fuer <%= servername %>"
- AuthUserFile <%= real_htpasswd_path %>
- require valid-user
- <%- end -%>
+<%= scope.function_template('apache/vhosts/partials/authentication.erb') %>
# silverstripe .htaccess
<Files *.ss>
Order deny,allow
@@ -299,12 +284,7 @@
Options <%- unless options.to_s == 'absent' then -%><%= options %><%- end -%><%- if do_includes.to_s == 'true' and not options.include?('+Includes') then -%> +Includes<%- end -%>
<%- end -%>
- <%- unless htpasswd_file.to_s == 'absent' then -%>
- AuthType Basic
- AuthName "Access fuer <%= servername %>"
- AuthUserFile <%= real_htpasswd_path %>
- require valid-user
- <%- end -%>
+<%= scope.function_template('apache/vhosts/partials/authentication.erb') %>
# silverstripe .htaccess
<Files *.ss>
diff --git a/templates/vhosts/php_simplemachine/php_simplemachine.erb b/templates/vhosts/php_simplemachine/php_simplemachine.erb
index ebab10d..5d7c87e 100644
--- a/templates/vhosts/php_simplemachine/php_simplemachine.erb
+++ b/templates/vhosts/php_simplemachine/php_simplemachine.erb
@@ -40,12 +40,7 @@
Options <%- unless options.to_s == 'absent' then -%><%= options %><%- end -%><%- if do_includes.to_s == 'true' and not options.include?('+Includes') then -%> +Includes<%- end -%>
<%- end -%>
- <%- unless htpasswd_file.to_s == 'absent' then -%>
- AuthType Basic
- AuthName "Access fuer <%= servername %>"
- AuthUserFile <%= real_htpasswd_path %>
- require valid-user
- <%- end -%>
+<%= scope.function_template('apache/vhosts/partials/authentication.erb') %>
php_admin_flag engine on
<%- unless php_default_charset.to_s == 'absent' then -%>
php_admin_value default_charset <%= php_default_charset %>
@@ -100,12 +95,7 @@
Options <%- unless options.to_s == 'absent' then -%><%= options %><%- end -%><%- if do_includes.to_s == 'true' and not options.include?('+Includes') then -%> +Includes<%- end -%>
<%- end -%>
- <%- unless htpasswd_file.to_s == 'absent' then -%>
- AuthType Basic
- AuthName "Access fuer <%= servername %>"
- AuthUserFile <%= real_htpasswd_path %>
- require valid-user
- <%- end -%>
+<%= scope.function_template('apache/vhosts/partials/authentication.erb') %>
php_admin_flag engine on
<%- unless php_default_charset.to_s == 'absent' then -%>
php_admin_value default_charset <%= php_default_charset %>
@@ -172,12 +162,7 @@
Options <%- unless options.to_s == 'absent' then -%><%= options %><%- end -%><%- if do_includes.to_s == 'true' and not options.include?('+Includes') then -%> +Includes<%- end -%>
<%- end -%>
- <%- unless htpasswd_file.to_s == 'absent' then -%>
- AuthType Basic
- AuthName "Access fuer <%= servername %>"
- AuthUserFile <%= real_htpasswd_path %>
- require valid-user
- <%- end -%>
+<%= scope.function_template('apache/vhosts/partials/authentication.erb') %>
</Directory>
<%- end -%>
<%- end -%>
@@ -232,12 +217,7 @@
Options <%- unless options.to_s == 'absent' then -%><%= options %><%- end -%><%- if do_includes.to_s == 'true' and not options.include?('+Includes') then -%> +Includes<%- end -%>
<%- end -%>
- <%- unless htpasswd_file.to_s == 'absent' then -%>
- AuthType Basic
- AuthName "Access fuer <%= servername %>"
- AuthUserFile <%= real_htpasswd_path %>
- require valid-user
- <%- end -%>
+<%= scope.function_template('apache/vhosts/partials/authentication.erb') %>
</Directory>
<%- end -%>
diff --git a/templates/vhosts/php_spip/php_spip.erb b/templates/vhosts/php_spip/php_spip.erb
index 48a6774..a4ffd19 100644
--- a/templates/vhosts/php_spip/php_spip.erb
+++ b/templates/vhosts/php_spip/php_spip.erb
@@ -40,12 +40,7 @@
Options <%- unless options.to_s == 'absent' then -%><%= options %><%- end -%><%- if do_includes.to_s == 'true' and not options.include?('+Includes') then -%> +Includes<%- end -%>
<%- end -%>
- <%- unless htpasswd_file.to_s == 'absent' then -%>
- AuthType Basic
- AuthName "Access fuer <%= servername %>"
- AuthUserFile <%= real_htpasswd_path %>
- require valid-user
- <%- end -%>
+<%= scope.function_template('apache/vhosts/partials/authentication.erb') %>
php_admin_flag engine on
<%- if php_safe_mode.to_s == 'false' -%>
php_admin_flag safe_mode Off
@@ -106,12 +101,7 @@
Options <%- unless options.to_s == 'absent' then -%><%= options %><%- end -%><%- if do_includes.to_s == 'true' and not options.include?('+Includes') then -%> +Includes<%- end -%>
<%- end -%>
- <%- unless htpasswd_file.to_s == 'absent' then -%>
- AuthType Basic
- AuthName "Access fuer <%= servername %>"
- AuthUserFile <%= real_htpasswd_path %>
- require valid-user
- <%- end -%>
+<%= scope.function_template('apache/vhosts/partials/authentication.erb') %>
php_admin_flag engine on
<%- if php_safe_mode.to_s == 'false' -%>
php_admin_flag safe_mode Off
@@ -184,12 +174,7 @@
Options <%- unless options.to_s == 'absent' then -%><%= options %><%- end -%><%- if do_includes.to_s == 'true' and not options.include?('+Includes') then -%> +Includes<%- end -%>
<%- end -%>
- <%- unless htpasswd_file.to_s == 'absent' then -%>
- AuthType Basic
- AuthName "Access fuer <%= servername %>"
- AuthUserFile <%= real_htpasswd_path %>
- require valid-user
- <%- end -%>
+<%= scope.function_template('apache/vhosts/partials/authentication.erb') %>
</Directory>
<%- end -%>
<%- end -%>
@@ -244,12 +229,7 @@
Options <%- unless options.to_s == 'absent' then -%><%= options %><%- end -%><%- if do_includes.to_s == 'true' and not options.include?('+Includes') then -%> +Includes<%- end -%>
<%- end -%>
- <%- unless htpasswd_file.to_s == 'absent' then -%>
- AuthType Basic
- AuthName "Access fuer <%= servername %>"
- AuthUserFile <%= real_htpasswd_path %>
- require valid-user
- <%- end -%>
+<%= scope.function_template('apache/vhosts/partials/authentication.erb') %>
</Directory>
<%- end -%>
diff --git a/templates/vhosts/php_typo3/php_typo3.erb b/templates/vhosts/php_typo3/php_typo3.erb
index 1fd5a1a..1fec8e7 100644
--- a/templates/vhosts/php_typo3/php_typo3.erb
+++ b/templates/vhosts/php_typo3/php_typo3.erb
@@ -40,12 +40,7 @@
Options <%- unless options.to_s == 'absent' then -%><%= options %><%- end -%><%- if do_includes.to_s == 'true' and not options.include?('+Includes') then -%> +Includes<%- end -%>
<%- end -%>
- <%- unless htpasswd_file.to_s == 'absent' then -%>
- AuthType Basic
- AuthName "Access fuer <%= servername %>"
- AuthUserFile <%= real_htpasswd_path %>
- require valid-user
- <%- end -%>
+<%= scope.function_template('apache/vhosts/partials/authentication.erb') %>
php_admin_flag engine on
<%- unless php_default_charset.to_s == 'absent' then -%>
php_admin_value default_charset <%= php_default_charset %>
@@ -113,12 +108,7 @@
Options <%- unless options.to_s == 'absent' then -%><%= options %><%- end -%><%- if do_includes.to_s == 'true' and not options.include?('+Includes') then -%> +Includes<%- end -%>
<%- end -%>
- <%- unless htpasswd_file.to_s == 'absent' then -%>
- AuthType Basic
- AuthName "Access fuer <%= servername %>"
- AuthUserFile <%= real_htpasswd_path %>
- require valid-user
- <%- end -%>
+<%= scope.function_template('apache/vhosts/partials/authentication.erb') %>
php_admin_flag engine on
<%- unless php_default_charset.to_s == 'absent' then -%>
php_admin_value default_charset <%= php_default_charset %>
@@ -190,12 +180,7 @@
Options <%- unless options.to_s == 'absent' then -%><%= options %><%- end -%><%- if do_includes.to_s == 'true' and not options.include?('+Includes') then -%> +Includes<%- end -%>
<%- end -%>
- <%- unless htpasswd_file.to_s == 'absent' then -%>
- AuthType Basic
- AuthName "Access fuer <%= servername %>"
- AuthUserFile <%= real_htpasswd_path %>
- require valid-user
- <%- end -%>
+<%= scope.function_template('apache/vhosts/partials/authentication.erb') %>
</Directory>
<Directory "<%= documentroot %>/typo3/">
RewriteEngine on
@@ -259,12 +244,7 @@
Options <%- unless options.to_s == 'absent' then -%><%= options %><%- end -%><%- if do_includes.to_s == 'true' and not options.include?('+Includes') then -%> +Includes<%- end -%>
<%- end -%>
- <%- unless htpasswd_file.to_s == 'absent' then -%>
- AuthType Basic
- AuthName "Access fuer <%= servername %>"
- AuthUserFile <%= real_htpasswd_path %>
- require valid-user
- <%- end -%>
+<%= scope.function_template('apache/vhosts/partials/authentication.erb') %>
</Directory>
<%- end -%>
diff --git a/templates/vhosts/php_wordpress/php_wordpress.erb b/templates/vhosts/php_wordpress/php_wordpress.erb
index 9180d9a..fe713c8 100644
--- a/templates/vhosts/php_wordpress/php_wordpress.erb
+++ b/templates/vhosts/php_wordpress/php_wordpress.erb
@@ -40,12 +40,7 @@
Options <%- unless options.to_s == 'absent' then -%><%= options %><%- end -%><%- if do_includes.to_s == 'true' and not options.include?('+Includes') then -%> +Includes<%- end -%>
<%- end -%>
- <%- unless htpasswd_file.to_s == 'absent' then -%>
- AuthType Basic
- AuthName "Access fuer <%= servername %>"
- AuthUserFile <%= real_htpasswd_path %>
- require valid-user
- <%- end -%>
+<%= scope.function_template('apache/vhosts/partials/authentication.erb') %>
php_admin_flag engine on
<%- unless php_default_charset.to_s == 'absent' then -%>
php_admin_value default_charset <%= php_default_charset %>
@@ -102,12 +97,7 @@
Options <%- unless options.to_s == 'absent' then -%><%= options %><%- end -%><%- if do_includes.to_s == 'true' and not options.include?('+Includes') then -%> +Includes<%- end -%>
<%- end -%>
- <%- unless htpasswd_file.to_s == 'absent' then -%>
- AuthType Basic
- AuthName "Access fuer <%= servername %>"
- AuthUserFile <%= real_htpasswd_path %>
- require valid-user
- <%- end -%>
+<%= scope.function_template('apache/vhosts/partials/authentication.erb') %>
php_admin_flag engine on
<%- unless php_default_charset.to_s == 'absent' then -%>
php_admin_value default_charset <%= php_default_charset %>
@@ -177,12 +167,7 @@
Options <%- unless options.to_s == 'absent' then -%><%= options %><%- end -%><%- if do_includes.to_s == 'true' and not options.include?('+Includes') then -%> +Includes<%- end -%>
<%- end -%>
- <%- unless htpasswd_file.to_s == 'absent' then -%>
- AuthType Basic
- AuthName "Access fuer <%= servername %>"
- AuthUserFile <%= real_htpasswd_path %>
- require valid-user
- <%- end -%>
+<%= scope.function_template('apache/vhosts/partials/authentication.erb') %>
</Directory>
<%- end -%>
<%- end -%>
@@ -237,12 +222,7 @@
Options <%- unless options.to_s == 'absent' then -%><%= options %><%- end -%><%- if do_includes.to_s == 'true' and not options.include?('+Includes') then -%> +Includes<%- end -%>
<%- end -%>
- <%- unless htpasswd_file.to_s == 'absent' then -%>
- AuthType Basic
- AuthName "Access fuer <%= servername %>"
- AuthUserFile <%= real_htpasswd_path %>
- require valid-user
- <%- end -%>
+<%= scope.function_template('apache/vhosts/partials/authentication.erb') %>
</Directory>
<%- end -%>
diff --git a/templates/vhosts/proxy/proxy.erb b/templates/vhosts/proxy/proxy.erb
index bb31b6b..1b1afd0 100644
--- a/templates/vhosts/proxy/proxy.erb
+++ b/templates/vhosts/proxy/proxy.erb
@@ -19,12 +19,7 @@
<Proxy *>
Order deny,allow
Allow from all
- <%- unless htpasswd_file.to_s == 'absent' then -%>
- AuthType Basic
- AuthName "Access fuer <%= servername %>"
- AuthUserFile <%= real_htpasswd_path %>
- require valid-user
- <%- end -%>
+<%= scope.function_template('apache/vhosts/partials/authentication.erb') %>
</Proxy>
ProxyRequests Off
ProxyPass / <%= options %>/
@@ -60,12 +55,7 @@
<Proxy *>
Order deny,allow
Allow from all
- <%- unless htpasswd_file.to_s == 'absent' then -%>
- AuthType Basic
- AuthName "Access fuer <%= servername %>"
- AuthUserFile <%= real_htpasswd_path %>
- require valid-user
- <%- end -%>
+<%= scope.function_template('apache/vhosts/partials/authentication.erb') %>
</Proxy>
ProxyRequests Off
ProxyPass / <%= options %>/
diff --git a/templates/vhosts/static/static.erb b/templates/vhosts/static/static.erb
index 05760d6..db5f102 100644
--- a/templates/vhosts/static/static.erb
+++ b/templates/vhosts/static/static.erb
@@ -26,12 +26,7 @@
Options <%- unless options.to_s == 'absent' then -%><%= options %><%- end -%><%- if do_includes.to_s == 'true' and not options.include?('+Includes') then -%> +Includes<%- end -%>
<%- end -%>
- <%- unless htpasswd_file.to_s == 'absent' then -%>
- AuthType Basic
- AuthName "Access fuer <%= servername %>"
- AuthUserFile <%= real_htpasswd_path %>
- require valid-user
- <%- end -%>
+<%= scope.function_template('apache/vhosts/partials/authentication.erb') %>
</Directory>
<%- end -%>
@@ -64,21 +59,14 @@
Header add Strict-Transport-Security "max-age=15768000"
- <%- if options.to_s != 'absent' or htpasswd_file.to_s != 'absent' then -%>
<Directory "<%= documentroot %>/">
AllowOverride <%= allow_override %>
<%- if options.to_s != 'absent' or do_includes.to_s == 'true' then -%>
Options <%= options %><%- if do_includes.to_s == 'true' and not options.include?('+Includes') then -%> +Includes<%- end -%>
<%- end -%>
- <%- unless htpasswd_file.to_s == 'absent' then -%>
- AuthType Basic
- AuthName "Access fuer <%= servername %>"
- AuthUserFile <%= real_htpasswd_path %>
- require valid-user
- <%- end -%>
+<%= scope.function_template('apache/vhosts/partials/authentication.erb') %>
</Directory>
- <%- end %>
<%= scope.function_template('apache/vhosts/partials/mod_security.erb') %>
diff --git a/templates/vhosts/webdav/webdav.erb b/templates/vhosts/webdav/webdav.erb
index 30d76e3..eb12e36 100644
--- a/templates/vhosts/webdav/webdav.erb
+++ b/templates/vhosts/webdav/webdav.erb
@@ -45,12 +45,7 @@
Options Indexes
<%- end -%>
- <%- unless htpasswd_file.to_s == 'absent' then -%>
- AuthType Basic
- AuthName "Access fuer <%= servername %>"
- AuthUserFile <%= real_htpasswd_path %>
- require valid-user
- <%- end -%>
+<%= scope.function_template('apache/vhosts/partials/authentication.erb') %>
<%- if ldap_auth.to_s == 'true' then -%>
Include include.d/ldap_auth.inc
<%- unless ldap_user.to_s == 'any' -%>
@@ -111,12 +106,7 @@
Options Indexes
<%- end -%>
- <%- unless htpasswd_file.to_s == 'absent' then -%>
- AuthType Basic
- AuthName "Access fuer <%= servername %>"
- AuthUserFile <%= real_htpasswd_path %>
- require valid-user
- <%- end -%>
+<%= scope.function_template('apache/vhosts/partials/authentication.erb') %>
<%- if ldap_auth.to_s == 'true' then -%>
Include include.d/ldap_auth.inc
<%- unless ldap_user.to_s == 'any' -%>