diff options
Diffstat (limited to 'templates/vhosts/perl')
-rw-r--r-- | templates/vhosts/perl/CentOS.erb | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/templates/vhosts/perl/CentOS.erb b/templates/vhosts/perl/CentOS.erb new file mode 100644 index 0000000..9c9e1f7 --- /dev/null +++ b/templates/vhosts/perl/CentOS.erb @@ -0,0 +1,46 @@ +<VirtualHost *:80> + Include conf.d/defaults.inc + + ServerName <%= servername %> + <%- unless serveralias.to_s.empty? then -%> + ServerAlias <%= serveralias %> + <%- end -%> + DocumentRoot <%= documentroot %>/ + + ErrorLog <%= logdir %>/error_log + CustomLog <%= logdir %>/access_log combined + + <Directory "<%= documentroot %>/"> + AllowOverride <%= allow_override %> + <%- unless options.to_s == 'absent' then -%> + Options <%= options %> + <%- end -%> + <%- unless htpasswd_file.to_s == 'absent' then -%> + AuthType Basic + AuthName "Access fuer <%= servername %>" + AuthUserFile <%= real_htpasswd_path %> + require valid-user + <%- end -%> + </Directory> + + ScriptAlias /cgi-bin/ <%= cgi_binpath %>/ + <%- unless htpasswd_file.to_s == 'absent' then -%> + <Directory "<%= cgi_binpath %>/"> + AuthType Basic + AuthName "Access fuer <%= servername %>" + AuthUserFile <%= real_htpasswd_path %> + require valid-user + </Directory> + <%- end -%> + + <IfModule mod_security2.c> + SecRuleEngine <%= if mod_security.to_s == 'true' then "On" else "Off" end %> + </IfModule> + + <%- unless additional_options.to_s == 'absent' then -%> + <%= additional_options %> + <%- end -%> + RewriteEngine on + RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK) + RewriteRule .* - [F] +</VirtualHost> |