X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/ea7cec92bc26d3a920da06070036ea62953ff03c..22df041f3f3b96c099322ddb344f32d689fff943:/cookbooks/osqa/templates/default/apache.erb?ds=sidebyside diff --git a/cookbooks/osqa/templates/default/apache.erb b/cookbooks/osqa/templates/default/apache.erb index 562f687e3..1ef85c040 100644 --- a/cookbooks/osqa/templates/default/apache.erb +++ b/cookbooks/osqa/templates/default/apache.erb @@ -1,6 +1,6 @@ # DO NOT EDIT - This file is being maintained by Chef -WSGIDaemonProcess <%= @name %> user=<%= @user %> group=<%= @group %> processes=4 threads=4 inactivity-timeout=600 graceful-timeout=60 maximum-requests=2000 python-home=<%= @python_home %> +WSGIDaemonProcess <%= @name %> user=<%= @user %> group=<%= @group %> processes=4 threads=8 restart-interval=3600 inactivity-timeout=600 graceful-timeout=60 maximum-requests=2000 python-home=<%= @python_home %> ServerName <%= @name %> @@ -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,27 @@ 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." + + + 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>