da5a60d2f94d520016e556a2ff78f560fa3e6ccd
[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                 Order allow,deny
41                 Allow from all
42         </Location>
43
44         <Location /otrs/nph-genericinterface.pl>
45                 PerlOptions -ParseHeaders
46         </Location>
47 </VirtualHost>
48
49 <Directory /opt/otrs/bin/cgi-bin>
50         AllowOverride None
51         Options +ExecCGI -Includes
52         Order allow,deny
53         Allow from all
54 </Directory>
55
56 <Directory /opt/otrs/var/httpd/htdocs>
57         AllowOverride None
58         Order allow,deny
59         Allow from all
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>