]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/web/templates/default/apache.frontend.erb
Add alerts for planet dumps and replication feeds
[chef.git] / cookbooks / web / templates / default / apache.frontend.erb
index f452b4fb385d40cc2a674b4a305a3e67cd044d3d..e679612323ea0bac118c3492d2022ddc751d4394 100644 (file)
@@ -78,7 +78,7 @@
   # https://gist.github.com/Firefishy/86ed5b86991b225179b54bbafbcd769e
   #
   RewriteCond "%{QUERY_STRING}" "^q=abcde&t=20"
   # https://gist.github.com/Firefishy/86ed5b86991b225179b54bbafbcd769e
   #
   RewriteCond "%{QUERY_STRING}" "^q=abcde&t=20"
-  RewriteRule "^/api/0\.6/notes/search$" - [R=204,L]
+  RewriteRule "^/api/0\.6/notes/search$" - [R=429,L]
 
   #
   # Force special MIME type for crossdomain.xml files
 
   #
   # Force special MIME type for crossdomain.xml files
 </VirtualHost>
 
 <VirtualHost *:80>
 </VirtualHost>
 
 <VirtualHost *:80>
-  ServerName openstreetmap.org
+  ServerName osm.org
 
   Header always set Cache-Control "max-age=31536000"
   Header always set Expires "Tue, 19 Jan 2038 03:14:07 GMT"
 
   Header always set Cache-Control "max-age=31536000"
   Header always set Expires "Tue, 19 Jan 2038 03:14:07 GMT"
   RewriteRule ^/\.well-known/acme-challenge/(.*)$ http://acme.openstreetmap.org/.well-known/acme-challenge/$1 [R=permanent,L]
 
   RewriteCond %{REQUEST_URI} !^/server-status$
   RewriteRule ^/\.well-known/acme-challenge/(.*)$ http://acme.openstreetmap.org/.well-known/acme-challenge/$1 [R=permanent,L]
 
   RewriteCond %{REQUEST_URI} !^/server-status$
-  RewriteRule ^(.*)$ https://openstreetmap.org$1 [L,NE,R=permanent]
+  RewriteRule ^(.*)$ https://osm.org$1 [L,NE,R=permanent]
 </VirtualHost>
 
 <VirtualHost *:80>
 </VirtualHost>
 
 <VirtualHost *:80>
-  ServerName www.openstreetmap.org
-  ServerAlias *
+  ServerName www.osm.org
 
   Header always set Cache-Control "max-age=31536000"
   Header always set Expires "Tue, 19 Jan 2038 03:14:07 GMT"
 
   Header always set Cache-Control "max-age=31536000"
   Header always set Expires "Tue, 19 Jan 2038 03:14:07 GMT"
 
   RewriteRule ^/\.well-known/acme-challenge/(.*)$ http://acme.openstreetmap.org/.well-known/acme-challenge/$1 [R=permanent,L]
 
 
   RewriteRule ^/\.well-known/acme-challenge/(.*)$ http://acme.openstreetmap.org/.well-known/acme-challenge/$1 [R=permanent,L]
 
-  # HSTS Preloading requires domain name match
-  RewriteCond %{HTTP_HOST} =osm.org
   RewriteCond %{REQUEST_URI} !^/server-status$
   RewriteCond %{REQUEST_URI} !^/server-status$
-  RewriteRule ^(.*)$ https://osm.org$1 [L,NE,R=permanent]
+  RewriteRule ^(.*)$ https://www.osm.org$1 [L,NE,R=permanent]
+</VirtualHost>
+
+<VirtualHost *:80>
+  ServerName openstreetmap.org
+
+  Header always set Cache-Control "max-age=31536000"
+  Header always set Expires "Tue, 19 Jan 2038 03:14:07 GMT"
+
+  RewriteEngine on
+
+  RewriteRule ^/\.well-known/acme-challenge/(.*)$ http://acme.openstreetmap.org/.well-known/acme-challenge/$1 [R=permanent,L]
 
 
-  # HSTS Preloading requires domain match
-  RewriteCond %{HTTP_HOST} =www.osm.org
   RewriteCond %{REQUEST_URI} !^/server-status$
   RewriteCond %{REQUEST_URI} !^/server-status$
-  RewriteRule ^(.*)$ https://www.osm.org$1 [L,NE,R=permanent]
+  RewriteRule ^(.*)$ https://openstreetmap.org$1 [L,NE,R=permanent]
+</VirtualHost>
+
+<VirtualHost *:80>
+  ServerName www.openstreetmap.org
+  ServerAlias *
+
+  Header always set Cache-Control "max-age=31536000"
+  Header always set Expires "Tue, 19 Jan 2038 03:14:07 GMT"
+
+  RewriteEngine on
+
+  RewriteRule ^/\.well-known/acme-challenge/(.*)$ http://acme.openstreetmap.org/.well-known/acme-challenge/$1 [R=permanent,L]
 
   RewriteCond %{REQUEST_URI} !^/server-status$
   RewriteRule ^(.*)$ https://www.openstreetmap.org$1 [L,NE,R=permanent]
 
   RewriteCond %{REQUEST_URI} !^/server-status$
   RewriteRule ^(.*)$ https://www.openstreetmap.org$1 [L,NE,R=permanent]