]> git.openstreetmap.org Git - chef.git/blob - cookbooks/otrs/templates/default/apache.erb
Add cookbook for blogs.openstreetmap.org
[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 / https://otrs.openstreetmap.org/
11 </VirtualHost>
12
13 <VirtualHost *:443>
14         ServerName <%= @name %>
15         ServerAdmin webmaster@openstreetmap.org
16
17         CustomLog /var/log/apache2/<%= @name %>-access.log combined
18         ErrorLog /var/log/apache2/<%= @name %>-error.log
19
20         SSLEngine on
21
22         ScriptAlias /otrs/ /opt/otrs/bin/cgi-bin/
23         Alias /otrs-web/ /opt/otrs/var/httpd/htdocs/
24         RedirectMatch ^/$ /otrs/index.pl
25
26         PerlRequire /opt/otrs/scripts/apache2-perl-startup.pl
27
28         PerlModule Apache2::Reload
29         PerlInitHandler Apache2::Reload
30         PerlModule Apache2::RequestRec
31
32         <Location /otrs>
33                 ErrorDocument 403 /otrs/index.pl
34                 ErrorDocument 404 /otrs/index.pl
35                 SetHandler  perl-script
36                 PerlResponseHandler ModPerl::Registry
37                 Options +ExecCGI
38                 PerlOptions +ParseHeaders
39                 PerlOptions +SetupEnv
40                 Require all granted
41         </Location>
42
43         <Location /otrs/nph-genericinterface.pl>
44                 PerlOptions -ParseHeaders
45         </Location>
46 </VirtualHost>
47
48 <Directory /opt/otrs/bin/cgi-bin>
49         AllowOverride None
50         Options +ExecCGI -Includes
51         Require all granted
52 </Directory>
53
54 <Directory /opt/otrs/var/httpd/htdocs>
55         AllowOverride None
56         Require all granted
57 </Directory>
58
59 <Directory /opt/otrs/var/httpd/htdocs/skins/*/*/css-cache>
60         <FilesMatch "\.(css|CSS)$">
61                 Header set Cache-Control "max-age=2592000 must-revalidate"
62         </FilesMatch>
63 </Directory>
64
65 <Directory /opt/otrs/var/httpd/htdocs/js/js-cache>
66         <FilesMatch "\.(js|JS)$">
67                 Header set Cache-Control "max-age=2592000 must-revalidate"
68         </FilesMatch>
69 </Directory>