]> git.openstreetmap.org Git - chef.git/blob - cookbooks/forum/templates/default/apache.erb
5235ee1f8378ed57298626f62c8be9c26e4b541e
[chef.git] / cookbooks / forum / templates / default / apache.erb
1 # DO NOT EDIT - This file is being maintained by Chef
2
3 <VirtualHost *:80>
4         ServerName forum.openstreetmap.org
5         ServerAlias forum.osm.org
6         ServerAdmin webmaster@openstreetmap.org
7
8         CustomLog /var/log/apache2/forum.openstreetmap.org-access.log combined
9         ErrorLog /var/log/apache2/forum.openstreetmap.org-error.log
10
11         RedirectPermanent /.well-known/acme-challenge/ http://acme.openstreetmap.org/.well-known/acme-challenge/
12         RedirectPermanent / https://forum.openstreetmap.org/
13 </VirtualHost>
14
15 <VirtualHost *:443>
16         ServerAlias forum.osm.org
17         ServerAdmin webmaster@openstreetmap.org
18
19         SSLEngine on
20         SSLCertificateFile /etc/ssl/certs/forum.openstreetmap.org.pem
21         SSLCertificateKeyFile /etc/ssl/private/forum.openstreetmap.org.key
22
23         CustomLog /var/log/apache2/forum.openstreetmap.org-access.log combined
24         ErrorLog /var/log/apache2/forum.openstreetmap.org-error.log
25
26         RedirectPermanent / https://forum.openstreetmap.org/
27 </VirtualHost>
28
29 <VirtualHost *:443>
30         ServerName forum.openstreetmap.org
31         ServerAdmin webmaster@openstreetmap.org
32
33         SSLEngine on
34         SSLCertificateFile /etc/ssl/certs/forum.openstreetmap.org.pem
35         SSLCertificateKeyFile /etc/ssl/private/forum.openstreetmap.org.key
36
37         CustomLog /var/log/apache2/forum.openstreetmap.org-access.log combined
38         ErrorLog /var/log/apache2/forum.openstreetmap.org-error.log
39
40         DocumentRoot /srv/forum.openstreetmap.org/html
41
42         <FilesMatch ".+\.ph(ar|p|tml)$">
43                 SetHandler "proxy:unix:/run/php/php-forum.openstreetmap.org-fpm.sock|fcgi://127.0.0.1"
44         </FilesMatch>
45 </VirtualHost>
46
47 <Directory /srv/forum.openstreetmap.org/html>
48         RewriteEngine on
49         RewriteRule ^config\.php$ - [F,L]
50
51         Options -Indexes
52
53         Require all granted
54 </Directory>
55
56 <Directory /srv/forum.openstreetmap.org/html/img>
57         <FilesMatch ".+\.ph(ar|p|tml)$">
58                 SetHandler None
59         </FilesMatch>
60 </Directory>