X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/d8672a09ce142d820a6b69261a742ef3f921197e..cf017d3cfcfb0916a489ed83471f833494ef3f78:/cookbooks/osqa/templates/default/apache.erb diff --git a/cookbooks/osqa/templates/default/apache.erb b/cookbooks/osqa/templates/default/apache.erb index 9aa0eb9cb..375e09c3d 100644 --- a/cookbooks/osqa/templates/default/apache.erb +++ b/cookbooks/osqa/templates/default/apache.erb @@ -9,7 +9,7 @@ WSGIDaemonProcess <%= @name %> user=<%= @user %> group=<%= @group %> processes=4 <% end -%> ServerAdmin webmaster@openstreetmap.org - CustomLog /var/log/apache2/<%= @name %>-access.log combined + CustomLog /var/log/apache2/<%= @name %>-access.log combined_extended ErrorLog /var/log/apache2/<%= @name %>-error.log RedirectPermanent /.well-known/acme-challenge/ http://acme.openstreetmap.org/.well-known/acme-challenge/ @@ -28,7 +28,7 @@ WSGIDaemonProcess <%= @name %> user=<%= @user %> group=<%= @group %> processes=4 SSLCertificateFile /etc/ssl/certs/<%= @name %>.pem SSLCertificateKeyFile /etc/ssl/private/<%= @name %>.key - CustomLog /var/log/apache2/<%= @name %>-access.log combined + CustomLog /var/log/apache2/<%= @name %>-access.log combined_extended ErrorLog /var/log/apache2/<%= @name %>-error.log RedirectPermanent / https://<%= @name %>/ @@ -43,7 +43,7 @@ WSGIDaemonProcess <%= @name %> user=<%= @user %> group=<%= @group %> processes=4 SSLCertificateFile /etc/ssl/certs/<%= @name %>.pem SSLCertificateKeyFile /etc/ssl/private/<%= @name %>.key - CustomLog /var/log/apache2/<%= @name %>-access.log combined + CustomLog /var/log/apache2/<%= @name %>-access.log combined_extended ErrorLog /var/log/apache2/<%= @name %>-error.log DocumentRoot <%= @directory %>/osqa @@ -53,6 +53,19 @@ WSGIDaemonProcess <%= @name %> user=<%= @user %> group=<%= @group %> processes=4 WSGIScriptAlias / <%= @directory %>/osqa/osqa.wsgi WSGIProcessGroup <%= @name %> + + # Site is now closed. Block access to login page and other pages. + + Require all denied + ErrorDocument 403 "help.openstreetmap.org is closed. Use community.openstreetmap.org instead." + + + Require all denied + ErrorDocument 403 "help.openstreetmap.org is closed. Use community.openstreetmap.org instead." + + RewriteEngine on + RewriteCond %{REQUEST_METHOD} POST + RewriteRule ^/questions - [F,NC] /osqa>