summaryrefslogtreecommitdiff
path: root/templates/vhosts/static
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2008-11-08 15:52:31 +0000
committermh <mh@immerda.ch>2008-11-08 15:52:31 +0000
commit84827754f2feed2a7c92a0ecdf1d094fbed292bc (patch)
treebd7cdc4f018439ee66ddeb1c76b75189ba8e2659 /templates/vhosts/static
parentf4ff26f1b89c405f714aca98cd2078fab678ae1e (diff)
added htpasswd deploy capability
Diffstat (limited to 'templates/vhosts/static')
-rw-r--r--templates/vhosts/static/OpenBSD.erb28
1 files changed, 24 insertions, 4 deletions
diff --git a/templates/vhosts/static/OpenBSD.erb b/templates/vhosts/static/OpenBSD.erb
index d5714f0..b3b8342 100644
--- a/templates/vhosts/static/OpenBSD.erb
+++ b/templates/vhosts/static/OpenBSD.erb
@@ -14,9 +14,19 @@
Redirect permanent / https://<%= servername %>/
<%- end %>
- <%- unless options.to_s == 'absent' then -%>
+ <%- if options.to_s != 'absent' or htpasswd_file.to_s != 'absent' then -%>
<Directory "<%= documentroot %>">
- Options <%= options %>
+ <%- unless options.to_s == 'absent' then %>
+ Options <%= options %>
+
+ <%- end %>
+ <%- unless htpasswd_file.to_s == 'absent' then -%>
+ AuthType Basic
+ AuthName "Access fuer <%= servername %>"
+ AuthUserFile <%= htpasswd_path %>
+ require valid-user
+
+ <%- end %>
</Directory>
<%- end %>
@@ -37,9 +47,19 @@
ErrorLog <%= logdir %>/error_log
CustomLog <%= logdir %>/access_log combined
- <%- unless options.to_s == 'absent' then -%>
+ <%- if options.to_s != 'absent' or htpasswd_file.to_s != 'absent' then -%>
<Directory "<%= documentroot %>">
- Options <%= options %>
+ <%- unless options.to_s == 'absent' then %>
+ Options <%= options %>
+
+ <%- end %>
+ <%- unless htpasswd_file.to_s == 'absent' then -%>
+ AuthType Basic
+ AuthName "Access fuer <%= servername %>"
+ AuthUserFile <%= htpasswd_path %>
+ require valid-user
+
+ <%- end %>
</Directory>
<%- end %>