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