]> git.openstreetmap.org Git - chef.git/commitdiff
Fix demised site redirect
authorGrant Slater <git@firefishy.com>
Fri, 15 Jul 2022 20:57:54 +0000 (23:57 +0300)
committerGrant Slater <git@firefishy.com>
Fri, 15 Jul 2022 20:57:54 +0000 (23:57 +0300)
cookbooks/subversion/recipes/default.rb
cookbooks/subversion/templates/default/apache.erb
cookbooks/trac/templates/default/apache.erb

index 7cba5bc73efd01650ec30b3f9d48460a6baf6ca8..9804e43e9649f1335a6ba6f2f32630ca14402eb4 100644 (file)
 
 include_recipe "apache"
 
-package "subversion" do
-  action :remove
-end
-
-apache_module "dav" do
-  action :disable
-end
-
-apache_module "dav_fs" do
-  action :disable
-end
-
-apache_module "dav_svn" do
-  package "libapache2-mod-svn"
-  action [:disable, :delete]
-end
-
-apache_module "authz_svn" do
-  package "libapache2-mod-svn"
-  action [:disable, :delete]
-end
+apache_module "rewrite"
 
 ssl_certificate "svn.openstreetmap.org" do
   domains ["svn.openstreetmap.org", "svn.osm.org"]
@@ -50,7 +30,3 @@ apache_site "svn.openstreetmap.org" do
   template "apache.erb"
   variables :aliases => ["svn.osm.org"]
 end
-
-file "/etc/cron.daily/svn-backup" do
-  action :delete
-end
index 49c1e1eba94a9b66f0aabce894ad0d109dec74fb..987d50930fd6872d7db10d177b3707036b2d0f34 100644 (file)
@@ -12,7 +12,9 @@
   ErrorLog /var/log/apache2/<%= @name %>-error.log
 
   RedirectPermanent /applications/editors/josm/plugins/cadastre-fr/images/cadastre_small.png https://raw.githubusercontent.com/openstreetmap/svn-archive/main/applications/editors/josm/plugins/cadastre-fr/images/cadastre_small.png
-  ErrorDocument 404 https://github.com/openstreetmap/svn-archive
+
+  RewriteEngine on
+  RewriteRule ^/?(.*) https://github.com/openstreetmap/svn-archive [L,R=permanent]
 
 </VirtualHost>
 <% unless @aliases.empty? -%>
index f8f898e2a3888a4dacd3f426613d363badbd7c74..5e1fc01df5a7acdf62ba02df28c90c728074b759 100644 (file)
@@ -47,6 +47,5 @@
   RewriteEngine on
   RewriteMap tickets txt:/srv/trac.openstreetmap.org/tickets.map
   RewriteRule ^/ticket/(\d+)$ https://github.com/openstreetmap/trac-tickets/issues/${tickets:$1}
-
-  ErrorDocument 404 https://github.com/openstreetmap/trac-tickets
+  RewriteRule ^/?(.*) https://github.com/openstreetmap/trac-tickets [L,R=permanent]
 </VirtualHost>