DocumentRoot <%= @directory %>
+<% if @ssl_enabled -%>
+ RedirectPermanent /.well-known/acme-challenge/ http://acme.openstreetmap.org/.well-known/acme-challenge/
+<% end -%>
+
php_admin_value open_basedir <%= @directory %>/:/usr/share/php/:/tmp/
#php_admin_value disable_functions "exec,shell_exec,system,passthru,popen,proc_open"
php_value memory_limit 128M
php_value upload_max_filesize 70M
php_value post_max_size 100M
+ RewriteCond %{SERVER_NAME} !=<%= @name %>
+<% if port == 443 -%>
+ RewriteRule ^/(.*)$ https://<%= @name %>/$1 [R=permanent]
+<% else -%>
+ RewriteRule ^/(.*)$ http://<%= @name %>/$1 [R=permanent]
+<% end -%>
+
RedirectMatch 301 ^/$ /wiki/Main_Page
#Historical Compatibility Links
RewriteCond %{REQUEST_URI} !^/api\.php$
RewriteCond %{REQUEST_URI} !^/opensearch_desc\.php$
RewriteCond %{REQUEST_URI} !^/server-status
+ RewriteCond %{REQUEST_URI} !^/.well-known/
RewriteCond %{LA-U:REQUEST_FILENAME} !-f
RewriteCond %{LA-U:REQUEST_FILENAME} !-d
RewriteRule ^/(.*) /wiki/$1 [R,L]