From 38e8fb687f0cb0f66d5a58d42e1f706b9d4c42e1 Mon Sep 17 00:00:00 2001 From: Julien Cristau Date: Sun, 29 Oct 2017 18:41:09 +0100 Subject: [PATCH] Import popcon.d.o apache vhost config --- .../roles/files/popcon/popcon.debian.org.conf | 71 +++++++++++++++++++ modules/roles/manifests/init.pp | 2 +- modules/roles/manifests/popcon.pp | 12 ++++ 3 files changed, 84 insertions(+), 1 deletion(-) create mode 100644 modules/roles/files/popcon/popcon.debian.org.conf create mode 100644 modules/roles/manifests/popcon.pp diff --git a/modules/roles/files/popcon/popcon.debian.org.conf b/modules/roles/files/popcon/popcon.debian.org.conf new file mode 100644 index 000000000..c589861bc --- /dev/null +++ b/modules/roles/files/popcon/popcon.debian.org.conf @@ -0,0 +1,71 @@ + + ServerName popcon.debian.org + ServerAlias popcon2.debian.org + ServerAdmin popcon-developers@lists.alioth.debian.org + + ErrorLog /var/log/apache2/popcon.debian.org-error.log + CustomLog /var/log/apache2/popcon.debian.org-access.log privacy + + DocumentRoot /srv/popcon.debian.org/www + + Require all granted + + + AddDefaultCharset utf-8 + ScriptAlias /cgi-bin /srv/popcon.debian.org/cgi-bin/ + + Require all granted + + + RewriteEngine on + RewriteRule ^/src:([-a-z+.0-9]+)$ https://qa.debian.org/developer.php?popcon=$1 [R,L] + + RewriteCond "%{HTTP_USER_AGENT}" !popcon-upload + RewriteRule ^(.*) https://popcon.debian.org$1 [R,L] + + #UserDir public_popcon + # + # AddOutputFilterByType DEFLATE text/html text/xml + # + + # + # + # Options +MultiViews + # + # AddHandler fcgid-script .php + # FCGIWrapper /usr/lib/cgi-bin/php5 .php + # + # Options ExecCGI + # + # + # + + + + ServerName popcon.debian.org + ServerAlias popcon2.debian.org + ServerAdmin popcon-developers@lists.alioth.debian.org + + Use common-debian-service-ssl popcon.debian.org +# Use common-ssl-HSTS + Use http-pkp-popcon.debian.org + + ErrorLog /var/log/apache2/popcon.debian.org-error.log + CustomLog /var/log/apache2/popcon.debian.org-access.log privacyssl + + DocumentRoot /srv/popcon.debian.org/www + + Require all granted + + + AddDefaultCharset utf-8 + ScriptAlias /cgi-bin /srv/popcon.debian.org/cgi-bin/ + + Require all granted + + + RewriteEngine on + RewriteRule ^/src:([-a-z+.0-9]+)$ https://qa.debian.org/developer.php?popcon=$1 [R,L] + + +# vim:set syn=apache: diff --git a/modules/roles/manifests/init.pp b/modules/roles/manifests/init.pp index b8507f331..6b447f9c5 100644 --- a/modules/roles/manifests/init.pp +++ b/modules/roles/manifests/init.pp @@ -355,6 +355,6 @@ class roles { } if has_role('popcon') { - ssl::service { 'popcon.debian.org': notify => Exec['service apache2 reload'], key => true, } + include roles::popcon } } diff --git a/modules/roles/manifests/popcon.pp b/modules/roles/manifests/popcon.pp new file mode 100644 index 000000000..080c8d5a1 --- /dev/null +++ b/modules/roles/manifests/popcon.pp @@ -0,0 +1,12 @@ +class roles::popcon { + ssl::service { 'popcon.debian.org': + notify => Exec['service apache2 reload'], + key => true, + } + + include apache2::ssl + apache2::site { 'popcon.debian.org': + site => 'popcon.debian.org', + source => 'puppet:///modules/roles/popcon/popcon.debian.org.conf', + } +} -- 2.20.1