2 ServerTokens <%= @server_tokens %>
3 ServerSignature <%= scope.function_bool2httpd([@server_signature]) %>
4 TraceEnable <%= scope.function_bool2httpd([@trace_enable]) %>
6 ServerName "<%= @servername %>"
7 ServerRoot "<%= @server_root %>"
8 PidFile <%= @pidfile %>
9 Timeout <%= @timeout %>
10 KeepAlive <%= @keepalive %>
11 MaxKeepAliveRequests <%= @max_keepalive_requests %>
12 KeepAliveTimeout <%= @keepalive_timeout %>
17 AccessFileName .htaccess
19 <%- if scope.function_versioncmp([@apache_version, '2.4']) >= 0 -%>
29 Options FollowSymLinks
33 <% if @default_charset -%>
34 AddDefaultCharset <%= @default_charset %>
37 <%- if scope.function_versioncmp([@apache_version, '2.4']) < 0 -%>
38 DefaultType <%= @default_type %>
41 ErrorLog "<%= @logroot %>/<%= @error_log %>"
42 LogLevel <%= @log_level %>
43 EnableSendfile <%= @sendfile %>
44 <%- if @allow_encoded_slashes -%>
45 AllowEncodedSlashes <%= @allow_encoded_slashes %>
50 <% if @apxs_workaround -%>
51 # Workaround: without this hack apxs would be confused about where to put
52 # LoadModule directives and fail entire procedure of apache package
53 # installation/reinstallation. This problem was observed on FreeBSD (apache22).
54 #LoadModule fake_module libexec/apache22/mod_fake.so
57 Include "<%= @mod_load_dir %>/*.load"
58 <% if @mod_load_dir != @confd_dir and @mod_load_dir != @vhost_load_dir -%>
59 Include "<%= @mod_load_dir %>/*.conf"
61 Include "<%= @ports_file %>"
63 <% unless @log_formats.has_key?('combined') -%>
64 LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
66 <% unless @log_formats.has_key?('common') -%>
67 LogFormat "%h %l %u %t \"%r\" %>s %b" common
69 <% unless @log_formats.has_key?('referer') -%>
70 LogFormat "%{Referer}i -> %U" referer
72 <% unless @log_formats.has_key?('agent') -%>
73 LogFormat "%{User-agent}i" agent
75 <% if @log_formats and !@log_formats.empty? -%>
76 <%- @log_formats.sort.each do |nickname,format| -%>
77 LogFormat "<%= format -%>" <%= nickname %>
81 <%- if scope.function_versioncmp([@apache_version, '2.4']) >= 0 -%>
82 IncludeOptional "<%= @confd_dir %>/*.conf"
84 Include "<%= @confd_dir %>/*.conf"
86 <% if @vhost_load_dir != @confd_dir -%>
87 <%- if scope.function_versioncmp([@apache_version, '2.4']) >= 0 -%>
88 IncludeOptional "<%= @vhost_load_dir %>/*"
90 Include "<%= @vhost_load_dir %>/*"
94 <% if @error_documents -%>
95 # /usr/share/apache2/error on debian
96 Alias /error/ "<%= @error_documents_path %>/"
98 <Directory "<%= @error_documents_path %>">
100 Options IncludesNoExec
101 AddOutputFilter Includes html
102 AddHandler type-map var
103 <%- if scope.function_versioncmp([@apache_version, '2.4']) >= 0 -%>
109 LanguagePriority en cs de es fr it nl sv pt-br ro
110 ForceLanguagePriority Prefer Fallback
113 ErrorDocument 400 /error/HTTP_BAD_REQUEST.html.var
114 ErrorDocument 401 /error/HTTP_UNAUTHORIZED.html.var
115 ErrorDocument 403 /error/HTTP_FORBIDDEN.html.var
116 ErrorDocument 404 /error/HTTP_NOT_FOUND.html.var
117 ErrorDocument 405 /error/HTTP_METHOD_NOT_ALLOWED.html.var
118 ErrorDocument 408 /error/HTTP_REQUEST_TIME_OUT.html.var
119 ErrorDocument 410 /error/HTTP_GONE.html.var
120 ErrorDocument 411 /error/HTTP_LENGTH_REQUIRED.html.var
121 ErrorDocument 412 /error/HTTP_PRECONDITION_FAILED.html.var
122 ErrorDocument 413 /error/HTTP_REQUEST_ENTITY_TOO_LARGE.html.var
123 ErrorDocument 414 /error/HTTP_REQUEST_URI_TOO_LARGE.html.var
124 ErrorDocument 415 /error/HTTP_UNSUPPORTED_MEDIA_TYPE.html.var
125 ErrorDocument 500 /error/HTTP_INTERNAL_SERVER_ERROR.html.var
126 ErrorDocument 501 /error/HTTP_NOT_IMPLEMENTED.html.var
127 ErrorDocument 502 /error/HTTP_BAD_GATEWAY.html.var
128 ErrorDocument 503 /error/HTTP_SERVICE_UNAVAILABLE.html.var
129 ErrorDocument 506 /error/HTTP_VARIANT_ALSO_VARIES.html.var