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"]
template "apache.erb"
variables :aliases => ["svn.osm.org"]
end
-
-file "/etc/cron.daily/svn-backup" do
- action :delete
-end
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? -%>
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>