diff options
Diffstat (limited to 'templates/vhosts/gitweb/partial.erb')
-rw-r--r-- | templates/vhosts/gitweb/partial.erb | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/templates/vhosts/gitweb/partial.erb b/templates/vhosts/gitweb/partial.erb index 7238ebe..a8475f6 100644 --- a/templates/vhosts/gitweb/partial.erb +++ b/templates/vhosts/gitweb/partial.erb @@ -1,19 +1,16 @@ - <% unless ssl_mode.to_s == 'force' -%> - SetEnv GITWEB_CONFIG <%= gitweb_config %> - DirectoryIndex gitweb.cgi - <Directory "<%= documentroot %>/"> - <% if options.to_s != 'absent' or do_includes.to_s == 'true'-%> - Options <% unless options.to_s == 'absent' -%><%= options %><% end -%><% if do_includes.to_s == 'true' && !options.include?('+Includes') -%> +Includes<% end -%><% unless options.include?('+ExecCGI') -%> +ExecCGI<% end -%> - <% end -%> - - AddHandler cgi-script .cgi - <Files gitweb.cgi> - Options ExecCGI FollowSymLinks - SetHandler cgi-script - </Files> - RewriteEngine on - RewriteRule ^[a-zA-Z0-9_-]+.git/?(\?.)?$ /gitweb.cgi%{REQUESTURI} [L,PT] + SetEnv GITWEB_CONFIG <%= @gitweb_config %> + DirectoryIndex gitweb.cgi + <Directory "<%= @documentroot %>/"> +<% if @options.to_s != 'absent' || @do_includes.to_s == 'true'-%> + Options <% unless @options.to_s == 'absent' -%><%= @options %><% end -%><% if @do_includes.to_s == 'true' && !@options.include?('+Includes') -%> +Includes<% end -%><% unless @options.include?('+ExecCGI') -%> +ExecCGI<% end -%> +<% end -%> + AddHandler cgi-script .cgi + <Files gitweb.cgi> + Options ExecCGI FollowSymLinks + SetHandler cgi-script + </Files> + RewriteEngine on + RewriteRule ^[a-zA-Z0-9_-]+.git/?(\?.)?$ /gitweb.cgi%{REQUESTURI} [L,PT] <%= scope.function_template(['apache/vhosts/partials/authentication.erb']) %> - </Directory> - <% end -%> + </Directory> |