summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--templates/vhosts/php/CentOS.erb10
-rw-r--r--templates/vhosts/static/OpenBSD.erb34
2 files changed, 21 insertions, 23 deletions
diff --git a/templates/vhosts/php/CentOS.erb b/templates/vhosts/php/CentOS.erb
index 96e5d27..0c3e33e 100644
--- a/templates/vhosts/php/CentOS.erb
+++ b/templates/vhosts/php/CentOS.erb
@@ -5,16 +5,16 @@
<%- unless serveralias.to_s.empty? then -%>
ServerAlias <%= serveralias %>
<%- end -%>
- DocumentRoot <%= documentroot %>
+ DocumentRoot <%= documentroot %>/
ErrorLog <%= logdir %>/error_log
CustomLog <%= logdir %>/access_log combined
- <Directory "<%= documentroot %>">
+ <Directory "<%= documentroot %>/">
AllowOverride <%= allow_override %>
<%- unless options.to_s == 'absent' then -%>
Options <%= options %>
- <%- end %>
+ <%- end -%>
<%- unless htpasswd_file.to_s == 'absent' then -%>
AuthType Basic
@@ -22,7 +22,7 @@
AuthUserFile <%= htpasswd_path %>
require valid-user
- <%- end %>
+ <%- end -%>
php_admin_flag engine on
php_admin_value open_basedir <%= documentroot %>:<%= php_upload_tmp_dir %>:<%= php_session_save_path %>
php_admin_value upload_tmp_dir <%= php_upload_tmp_dir %>
@@ -30,7 +30,7 @@
</Directory>
<IfModule mod_security2.c>
- SecRuleEngine <%= if mod_security.to_s == 'true' then "On" else "Off" end %>
+ SecRuleEngine <%= if mod_security.to_s == 'true' then "On" else "Off" end -%>
</IfModule>
<%- unless additional_options.to_s == 'absent' then -%>
diff --git a/templates/vhosts/static/OpenBSD.erb b/templates/vhosts/static/OpenBSD.erb
index b3b8342..b0054e6 100644
--- a/templates/vhosts/static/OpenBSD.erb
+++ b/templates/vhosts/static/OpenBSD.erb
@@ -5,36 +5,36 @@
<%- unless serveralias.to_s.empty? then -%>
ServerAlias <%= serveralias %>
<%- end -%>
- DocumentRoot <%= documentroot %>
+ DocumentRoot <%= documentroot %>/
ErrorLog <%= logdir %>/error_log
CustomLog <%= logdir %>/access_log combined
- <%- if ssl_mode.to_s=='force' then %>
+ <%- if ssl_mode.to_s=='force' then -%>
Redirect permanent / https://<%= servername %>/
- <%- end %>
+ <%- end -%>
<%- if options.to_s != 'absent' or htpasswd_file.to_s != 'absent' then -%>
- <Directory "<%= documentroot %>">
- <%- unless options.to_s == 'absent' then %>
+ <Directory "<%= documentroot %>/">
+ <%- unless options.to_s == 'absent' then -%>
Options <%= options %>
- <%- end %>
+ <%- end -%>
<%- unless htpasswd_file.to_s == 'absent' then -%>
AuthType Basic
AuthName "Access fuer <%= servername %>"
AuthUserFile <%= htpasswd_path %>
require valid-user
-
- <%- end %>
+ <%- end -%>
</Directory>
- <%- end %>
+ <%- end _%>
<%- unless additional_options.to_s == 'absent' then -%>
<%= additional_options %>
<%- end -%>
</VirtualHost>
-<%- unless ssl_mode.to_s == 'false' then %>
+
+<%- unless ssl_mode.to_s == 'false' then -%>
<VirtualHost *:443>
Include conf.d/defaults.inc
Include conf.d/ssl_defaults.inc
@@ -42,24 +42,22 @@
<%- unless serveralias.to_s.empty? then -%>
ServerAlias <%= serveralias %>
<%- end -%>
- DocumentRoot <%= documentroot %>
+ DocumentRoot <%= documentroot %>/
ErrorLog <%= logdir %>/error_log
CustomLog <%= logdir %>/access_log combined
-
<%- if options.to_s != 'absent' or htpasswd_file.to_s != 'absent' then -%>
- <Directory "<%= documentroot %>">
- <%- unless options.to_s == 'absent' then %>
+ <Directory "<%= documentroot %>/">
+ <%- unless options.to_s == 'absent' then -%>
Options <%= options %>
- <%- end %>
+ <%- end -%>
<%- unless htpasswd_file.to_s == 'absent' then -%>
AuthType Basic
AuthName "Access fuer <%= servername %>"
AuthUserFile <%= htpasswd_path %>
require valid-user
-
- <%- end %>
+ <%- end -%>
</Directory>
<%- end %>
@@ -67,4 +65,4 @@
<%= additional_options %>
<%- end -%>
</VirtualHost>
-<%- end %>
+<%- end -%>