Update planet to use apache 2.4 permissions
[chef.git] / cookbooks / planet / templates / default / apache.erb
1 # DO NOT EDIT - This file is being maintained by Chef
2
3 <VirtualHost *:80>
4         ServerName planet.openstreetmap.org
5         ServerAlias planet.osm.org
6         ServerAdmin webmaster@openstreetmap.org
7
8         CustomLog /var/log/apache2/planet.openstreetmap.org-access.log combined
9         ErrorLog /var/log/apache2/planet.openstreetmap.org-error.log
10
11         DocumentRoot /store/planet
12
13         <Directory /store/planet>
14                 Options Indexes FollowSymLinks MultiViews ExecCGI
15                 AllowOverride All
16                 IndexIgnore .ht* . robots.txt HEADER.html HEADER.cgi logo.png style.css
17                 IndexOptions FancyIndexing FoldersFirst NameWidth=* TrackModified SuppressHTMLPreamble
18                 HeaderName HEADER.cgi
19                 IndexOrderDefault Descending Date
20                 AddType text/html .cgi
21                 AddHandler cgi-script .cgi
22                 Require all granted
23         </Directory>
24
25         ProxyPass /replication/streaming http://127.0.0.1:8080
26
27         <Location /replication/steaming>
28                 Order deny,allow
29                 Allow from all
30         </Location>
31
32         Redirect /pbf-experimental/     /pbf/
33
34         <IfModule mod_headers.c>
35                 Header set Access-Control-Allow-Origin "*"
36         </IfModule>
37
38         RewriteEngine on
39         RewriteMap latestplanet prg:/usr/local/bin/apache-latest-planet-filename
40
41         #Direct, no redirect for the following
42         RewriteCond     %{REMOTE_ADDR}  ^193\.63\.              [OR]
43         RewriteCond     %{REMOTE_ADDR}  ^127\.                  [OR]
44         RewriteCond     %{REMOTE_ADDR}  ^10\.                   [OR]
45         RewriteCond     %{REMOTE_ADDR}  ^193\.1\.219\.88        [OR]
46         RewriteCond     %{REMOTE_ADDR}  ^193\.1\.193\.64        [OR]
47         RewriteCond     %{REMOTE_ADDR}  ^146\.169\.             [OR]
48         RewriteCond     %{REMOTE_ADDR}  ^129\.31\.              [OR]
49         RewriteCond     %{REMOTE_ADDR}  ^193\.60\.              [OR]
50         RewriteCond     %{REMOTE_ADDR}  ^193\.61\.              [OR]
51         RewriteCond     %{REMOTE_ADDR}  ^193\.62\.              [OR]
52         RewriteCond     %{REMOTE_ADDR}  ^193\.63\.              [OR]
53         RewriteCond     %{QUERY_STRING} nomirror
54         RewriteRule     .*      - [L]
55
56         RewriteRule     ^(/planet/planet\-latest\.osm\.bz2)$    ${latestplanet:$1}      [R,L]
57 </VirtualHost>
58
59 <VirtualHost *:443>
60         ServerName planet.openstreetmap.org
61         ServerAlias planet.osm.org
62         ServerAdmin webmaster@openstreetmap.org
63
64         SSLEngine on
65
66         CustomLog /var/log/apache2/planet.openstreetmap.org-access.log combined
67         ErrorLog /var/log/apache2/planet.openstreetmap.org-error.log
68
69         Redirect / http://planet.openstreetmap.org/
70 </VirtualHost>