X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/5d511fe466e334435ca1e578c44558a57369ffea..d4db5c7d063bb8bbb891f057d9a775ebf3390eaa:/cookbooks/cgiirc/templates/default/apache.erb diff --git a/cookbooks/cgiirc/templates/default/apache.erb b/cookbooks/cgiirc/templates/default/apache.erb index 780e54784..1afb107ba 100644 --- a/cookbooks/cgiirc/templates/default/apache.erb +++ b/cookbooks/cgiirc/templates/default/apache.erb @@ -1,37 +1,59 @@ # DO NOT EDIT - This file is being maintained by Chef - ServerName <%= @name %> - ServerAdmin webmaster@openstreetmap.org + ServerName <%= @name %> + ServerAdmin webmaster@openstreetmap.org - SSLEngine on - SSLCertificateFile /etc/ssl/certs/<%= @name %>.pem - SSLCertificateKeyFile /etc/ssl/private/<%= @name %>.key + 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 + 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 + - DocumentRoot /usr/lib/cgi-bin/cgiirc - DirectoryIndex irc.cgi - Alias /images /usr/share/images/cgiirc + + 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 - - AddHandler cgi-script .cgi - Require all granted - + SSLEngine on + SSLCertificateFile /etc/ssl/certs/<%= @name %>.pem + SSLCertificateKeyFile /etc/ssl/private/<%= @name %>.key - - Require all granted - + CustomLog /var/log/apache2/<%= @name %>-access.log combined + ErrorLog /var/log/apache2/<%= @name %>-error.log - - RemoveOutputFilter DEFLATE - SetEnv no-gzip - + 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