]> git.openstreetmap.org Git - chef.git/blob - cookbooks/otrs/templates/default/apache.erb
Add customised copy of squid_icp munin plugin
[chef.git] / cookbooks / otrs / templates / default / apache.erb
1 # DO NOT EDIT - This file is being maintained by Chef
2
3 <VirtualHost *:80>
4         ServerName <%= @name %>
5         ServerAdmin webmaster@openstreetmap.org
6
7         CustomLog /var/log/apache2/<%= @name %>-access.log combined
8         ErrorLog /var/log/apache2/<%= @name %>-error.log
9
10         RedirectPermanent /.well-known/acme-challenge/ http://acme.openstreetmap.org/.well-known/acme-challenge/
11         RedirectPermanent / https://otrs.openstreetmap.org/
12 </VirtualHost>
13
14 <VirtualHost *:443>
15         ServerName <%= @name %>
16         ServerAdmin webmaster@openstreetmap.org
17
18         CustomLog /var/log/apache2/<%= @name %>-access.log combined
19         ErrorLog /var/log/apache2/<%= @name %>-error.log
20
21         SSLEngine on
22         SSLCertificateFile /etc/ssl/certs/<%= @name %>.pem
23         SSLCertificateKeyFile /etc/ssl/private/<%= @name %>.key
24
25         ScriptAlias /otrs/ /opt/otrs/bin/cgi-bin/
26         Alias /otrs-web/ /opt/otrs/var/httpd/htdocs/
27         RedirectMatch ^/$ /otrs/index.pl
28
29         PerlRequire /opt/otrs/scripts/apache2-perl-startup.pl
30
31         PerlModule Apache2::Reload
32         PerlInitHandler Apache2::Reload
33         PerlModule Apache2::RequestRec
34
35         <Location /otrs>
36                 ErrorDocument 403 /otrs/index.pl
37                 ErrorDocument 404 /otrs/index.pl
38                 SetHandler  perl-script
39                 PerlResponseHandler ModPerl::Registry
40                 Options +ExecCGI
41                 PerlOptions +ParseHeaders
42                 PerlOptions +SetupEnv
43                 Require all granted
44         </Location>
45
46         <Location /otrs/nph-genericinterface.pl>
47                 PerlOptions -ParseHeaders
48         </Location>
49 </VirtualHost>
50
51 <Directory /opt/otrs/bin/cgi-bin>
52         AllowOverride None
53         Options +ExecCGI -Includes
54         Require all granted
55 </Directory>
56
57 <Directory /opt/otrs/var/httpd/htdocs>
58         AllowOverride None
59         Require all granted
60 </Directory>
61
62 <Directory /opt/otrs/var/httpd/htdocs/skins/*/*/css-cache>
63         <FilesMatch "\.(css|CSS)$">
64                 Header set Cache-Control "max-age=2592000 must-revalidate"
65         </FilesMatch>
66 </Directory>
67
68 <Directory /opt/otrs/var/httpd/htdocs/js/js-cache>
69         <FilesMatch "\.(js|JS)$">
70                 Header set Cache-Control "max-age=2592000 must-revalidate"
71         </FilesMatch>
72 </Directory>