1 # DO NOT EDIT - This file is being maintained by Chef
 
   4   ServerName <%= @name %>
 
   5 <% @aliases.each do |alias_name| -%>
 
   6   ServerAlias <%= alias_name %>
 
   8   ServerAdmin webmaster@openstreetmap.org
 
  10   CustomLog /var/log/apache2/<%= @name %>-access.log combined_extended
 
  11   ErrorLog /var/log/apache2/<%= @name %>-error.log
 
  13   RedirectPermanent /.well-known/acme-challenge/ http://acme.openstreetmap.org/.well-known/acme-challenge/
 
  14   RedirectPermanent / https://<%= @name %>/
 
  16 <% unless @aliases.empty? -%>
 
  19   ServerName <%= @aliases.first %>
 
  20 <% @aliases.drop(1).each do |alias_name| -%>
 
  21   ServerAlias <%= alias_name %>
 
  23   ServerAdmin webmaster@openstreetmap.org
 
  26   SSLCertificateFile /etc/ssl/certs/<%= @name %>.pem
 
  27   SSLCertificateKeyFile /etc/ssl/private/<%= @name %>.key
 
  29   CustomLog /var/log/apache2/<%= @name %>-access.log combined_extended
 
  30   ErrorLog /var/log/apache2/<%= @name %>-error.log
 
  32   RedirectPermanent / https://<%= @name %>/
 
  37   ServerName <%= @name %>
 
  38   ServerAdmin webmaster@openstreetmap.org
 
  40   CustomLog /var/log/apache2/<%= @name %>-access.log combined_extended
 
  41   ErrorLog /var/log/apache2/<%= @name %>-error.log
 
  44   SSLCertificateFile /etc/ssl/certs/<%= @name %>.pem
 
  45   SSLCertificateKeyFile /etc/ssl/private/<%= @name %>.key
 
  49   ScriptAlias /otrs "/usr/share/otrs/bin/cgi-bin/"
 
  50   Alias /otrs-web "/usr/share/otrs/var/httpd/htdocs/"
 
  51   RedirectMatch ^/$ /otrs/index.pl
 
  53   Perlrequire /usr/share/otrs/scripts/apache2-perl-startup.pl
 
  55   PerlModule Apache2::Reload
 
  56   PerlInitHandler Apache2::Reload
 
  59     ErrorDocument 403 /otrs/index.pl
 
  60     ErrorDocument 404 /otrs/index.pl
 
  61     SetHandler  perl-script
 
  62     PerlResponseHandler ModPerl::Registry
 
  64     PerlOptions +ParseHeaders
 
  69   <Location /otrs/nph-genericinterface.pl>
 
  70     PerlOptions -ParseHeaders
 
  74 <Directory "/usr/share/otrs/bin/cgi-bin/">
 
  76     Options +ExecCGI -Includes
 
  80 <Directory "/usr/share/otrs/var/httpd/htdocs/">
 
  84   # Make sure CSS and JS files are read as UTF8 by the browsers.
 
  88   # Set explicit mime type for woff fonts since it is relatively new and apache may not know about it.
 
  89   AddType application/font-woff .woff
 
  92 # Cache css-cache for 30 days
 
  93 <Directory "/usr/share/otrs/var/httpd/htdocs/skins/*/*/css-cache">
 
  94     <FilesMatch "\.(css|CSS)$">
 
  95         Header set Cache-Control "max-age=2592000, must-revalidate"
 
  99 <Directory "/usr/share/otrs/var/httpd/htdocs/skins/*/*/css/thirdparty">
 
 100     <FilesMatch "\.(css|CSS|woff|svg)$">
 
 101         Header set Cache-Control "max-age=14400, must-revalidate"
 
 105 <Directory "/usr/share/otrs/var/httpd/htdocs/js/js-cache">
 
 106     <FilesMatch "\.(js|JS)$">
 
 107         Header set Cache-Control "max-age=2592000, must-revalidate"
 
 111 <Directory "/usr/share/otrs/var/httpd/htdocs/js/thirdparty/">
 
 112     <FilesMatch "\.(js|JS)$">
 
 113         Header set Cache-Control "max-age=14400, must-revalidate"