X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/d5bc6c029a4961f3aad5a9f488370468f8df88dc..69ae3f456bc97cb78a7b125fe07dac2af12ba78f:/cookbooks/otrs/templates/default/apache.erb?ds=sidebyside
diff --git a/cookbooks/otrs/templates/default/apache.erb b/cookbooks/otrs/templates/default/apache.erb
index a3605a966..17f0df118 100644
--- a/cookbooks/otrs/templates/default/apache.erb
+++ b/cookbooks/otrs/templates/default/apache.erb
@@ -11,7 +11,7 @@
ErrorLog /var/log/apache2/<%= @name %>-error.log
RedirectPermanent /.well-known/acme-challenge/ http://acme.openstreetmap.org/.well-known/acme-challenge/
- RedirectPermanent / https://otrs.openstreetmap.org/
+ RedirectPermanent / https://<%= @name %>/
<% unless @aliases.empty? -%>
@@ -44,15 +44,14 @@
SSLCertificateFile /etc/ssl/certs/<%= @name %>.pem
SSLCertificateKeyFile /etc/ssl/private/<%= @name %>.key
- ScriptAlias /otrs/ /opt/otrs/bin/cgi-bin/
- Alias /otrs-web/ /opt/otrs/var/httpd/htdocs/
+ ScriptAlias /otrs "/usr/share/otrs/bin/cgi-bin/"
+ Alias /otrs-web "/usr/share/otrs/var/httpd/htdocs/"
RedirectMatch ^/$ /otrs/index.pl
- PerlRequire /opt/otrs/scripts/apache2-perl-startup.pl
+ Perlrequire /usr/share/otrs/scripts/apache2-perl-startup.pl
PerlModule Apache2::Reload
PerlInitHandler Apache2::Reload
- PerlModule Apache2::RequestRec
ErrorDocument 403 /otrs/index.pl
@@ -70,25 +69,45 @@
-
- AllowOverride None
- Options +ExecCGI -Includes
- Require all granted
+
+ AllowOverride None
+ Options +ExecCGI -Includes
+ Require all granted
-
+
AllowOverride None
Require all granted
+
+ # Make sure CSS and JS files are read as UTF8 by the browsers.
+ AddCharset UTF-8 .css
+ AddCharset UTF-8 .js
+
+ # Set explicit mime type for woff fonts since it is relatively new and apache may not know about it.
+ AddType application/font-woff .woff
+
+
+# Cache css-cache for 30 days
+
+
+ Header set Cache-Control "max-age=2592000, must-revalidate"
+
+
+
+
+
+ Header set Cache-Control "max-age=14400, must-revalidate"
+
-
-
- Header set Cache-Control "max-age=2592000 must-revalidate"
-
+
+
+ Header set Cache-Control "max-age=2592000, must-revalidate"
+
-
-
- Header set Cache-Control "max-age=2592000 must-revalidate"
-
+
+
+ Header set Cache-Control "max-age=14400, must-revalidate"
+