X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/8604bd193412c0bf604d8b8e38b76d0e350f107c..d4db5c7d063bb8bbb891f057d9a775ebf3390eaa:/cookbooks/cgiirc/templates/default/apache.erb
diff --git a/cookbooks/cgiirc/templates/default/apache.erb b/cookbooks/cgiirc/templates/default/apache.erb
index 025892c74..1afb107ba 100644
--- a/cookbooks/cgiirc/templates/default/apache.erb
+++ b/cookbooks/cgiirc/templates/default/apache.erb
@@ -1,27 +1,64 @@
# DO NOT EDIT - This file is being maintained by Chef
+
+ ServerName <%= @name %>
+ ServerAdmin webmaster@openstreetmap.org
+
+ SSLEngine on
+ SSLCertificateFile /etc/ssl/certs/<%= @name %>.pem
+ SSLCertificateKeyFile /etc/ssl/private/<%= @name %>.key
+
+ CustomLog /var/log/apache2/<%= @name %>-access.log combined
+ ErrorLog /var/log/apache2/<%= @name %>-error.log
+
+ DocumentRoot /usr/lib/cgi-bin/cgiirc
+ DirectoryIndex irc.cgi
+ Alias /images /usr/share/images/cgiirc
+
+
+ AddHandler cgi-script .cgi
+ Require all granted
+
+
+
+ Require all granted
+
+
+
+ RemoveOutputFilter DEFLATE
+ SetEnv no-gzip
+
+
+<% unless @aliases.empty? -%>
+
+
+ ServerName <%= @aliases.first %>
+<% @aliases.drop(1).each do |alias_name| -%>
+ ServerAlias <%= alias_name %>
+<% end -%>
+ ServerAdmin webmaster@openstreetmap.org
+
+ SSLEngine on
+ SSLCertificateFile /etc/ssl/certs/<%= @name %>.pem
+ SSLCertificateKeyFile /etc/ssl/private/<%= @name %>.key
+
+ CustomLog /var/log/apache2/<%= @name %>-access.log combined
+ ErrorLog /var/log/apache2/<%= @name %>-error.log
+
+ RedirectPermanent / https://<%= @name %>/
+
+<% end -%>
+
- ServerName <%= @name %>
+ ServerName <%= @name %>
+<% @aliases.each do |alias_name| -%>
+ ServerAlias <%= alias_name %>
+<% end -%>
ServerAdmin webmaster@openstreetmap.org
CustomLog /var/log/apache2/<%= @name %>-access.log combined
ErrorLog /var/log/apache2/<%= @name %>-error.log
- DocumentRoot /usr/lib/cgi-bin/cgiirc
- DirectoryIndex irc.cgi
- Alias /images /usr/share/images/cgiirc
-
-
- AddHandler cgi-script .cgi
- Require all granted
-
-
-
- Require all granted
-
-
-
- RemoveOutputFilter DEFLATE
- SetEnv no-gzip
-
+ RedirectPermanent /.well-known/acme-challenge/ http://acme.openstreetmap.org/.well-known/acme-challenge/
+ RedirectPermanent / https://<%= @name %>/