From 1dd0ba0f045b94641a6328b0b1536ceebcfce9a6 Mon Sep 17 00:00:00 2001 Message-Id: <1dd0ba0f045b94641a6328b0b1536ceebcfce9a6.1473324089.git.hahn@univention.de> From: Philipp Hahn Date: Thu, 8 Sep 2016 10:10:49 +0200 Subject: [PATCH 1/6] Bug #42196 apache: Restart Organization: Univention GmbH, Bremen, Germany Debian maintainer scripts MUST use invoke-rc.d --- .../ucs-4.2/ucs-4.2-0/services/univention-apache/debian/changelog | 6 ++++++ .../services/univention-apache/debian/univention-apache.postinst | 8 +++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/branches/ucs-4.2/ucs-4.2-0/services/univention-apache/debian/changelog b/branches/ucs-4.2/ucs-4.2-0/services/univention-apache/debian/changelog index 3e7d48c..160378b 100644 --- a/branches/ucs-4.2/ucs-4.2-0/services/univention-apache/debian/changelog +++ b/branches/ucs-4.2/ucs-4.2-0/services/univention-apache/debian/changelog @@ -1,3 +1,9 @@ +univention-apache (9.0.1-1) unstable; urgency=low + + * Bug #42196: Fix default configuration + + -- Philipp Hahn Thu, 08 Sep 2016 10:10:19 +0200 + univention-apache (9.0.0-4) unstable; urgency=low * Bug #42196: apache config upgrade diff --git a/branches/ucs-4.2/ucs-4.2-0/services/univention-apache/debian/univention-apache.postinst b/branches/ucs-4.2/ucs-4.2-0/services/univention-apache/debian/univention-apache.postinst index 3270e46..968dc82 100644 --- a/branches/ucs-4.2/ucs-4.2-0/services/univention-apache/debian/univention-apache.postinst +++ b/branches/ucs-4.2/ucs-4.2-0/services/univention-apache/debian/univention-apache.postinst @@ -34,7 +34,7 @@ # update to 4.2-0 dpkg-maintscript-helper rm_conffile /etc/univention/templates/files/etc/apache2/conf.d/ucs.conf -- $@ -if dpkg --compare-versions "$2" lt-nl 9.0.0-1; then +if dpkg --compare-versions "$2" lt-nl 9.0.0; then ucr update a2dismod auth_pam fi @@ -102,9 +102,9 @@ fi if [ -x /etc/init.d/apache2 ]; then # better stop&start, as this behaves differently to restart - /etc/init.d/apache2 stop + invoke-rc.d apache2 stop sleep 3 - /etc/init.d/apache2 start + invoke-rc.d apache2 start fi ucr set "ucs/server/languages/en_US?English" \ @@ -113,6 +113,4 @@ ucr set "ucs/server/languages/en_US?English" \ "ucs/server/languages/de_AT?Deutsch (Österreich)" \ "ucs/server/languages/de_CH?Deutsch (Schweiz)" - exit 0 - -- 2.1.4 From cf5c551ba9f389bb21e0d2a6845022ae1f42b20d Mon Sep 17 00:00:00 2001 Message-Id: In-Reply-To: <1dd0ba0f045b94641a6328b0b1536ceebcfce9a6.1473324089.git.hahn@univention.de> References: <1dd0ba0f045b94641a6328b0b1536ceebcfce9a6.1473324089.git.hahn@univention.de> From: Philipp Hahn Date: Thu, 8 Sep 2016 09:01:48 +0200 Subject: [PATCH 2/6] Bug #42196 apache: Fix renamed conf file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Organization: Univention GmbH, Bremen, Germany rm → mv $VER --- .../debian/univention-apache.maintscript | 1 + .../debian/univention-apache.postinst | 1 - .../debian/univention-apache.postrm | 2 -- .../debian/univention-apache.preinst | 37 ---------------------- 4 files changed, 1 insertion(+), 40 deletions(-) create mode 100644 branches/ucs-4.2/ucs-4.2-0/services/univention-apache/debian/univention-apache.maintscript delete mode 100644 branches/ucs-4.2/ucs-4.2-0/services/univention-apache/debian/univention-apache.preinst diff --git a/branches/ucs-4.2/ucs-4.2-0/services/univention-apache/debian/univention-apache.maintscript b/branches/ucs-4.2/ucs-4.2-0/services/univention-apache/debian/univention-apache.maintscript new file mode 100644 index 0000000..4c28dd1 --- /dev/null +++ b/branches/ucs-4.2/ucs-4.2-0/services/univention-apache/debian/univention-apache.maintscript @@ -0,0 +1 @@ +mv_conffile /etc/univention/templates/files/etc/apache2/conf.d/ucs.conf /etc/univention/templates/files/etc/apache2/conf-available/ucs.conf 9.0.1~ diff --git a/branches/ucs-4.2/ucs-4.2-0/services/univention-apache/debian/univention-apache.postinst b/branches/ucs-4.2/ucs-4.2-0/services/univention-apache/debian/univention-apache.postinst index 968dc82..692624e 100644 --- a/branches/ucs-4.2/ucs-4.2-0/services/univention-apache/debian/univention-apache.postinst +++ b/branches/ucs-4.2/ucs-4.2-0/services/univention-apache/debian/univention-apache.postinst @@ -33,7 +33,6 @@ #DEBHELPER# # update to 4.2-0 -dpkg-maintscript-helper rm_conffile /etc/univention/templates/files/etc/apache2/conf.d/ucs.conf -- $@ if dpkg --compare-versions "$2" lt-nl 9.0.0; then ucr update a2dismod auth_pam diff --git a/branches/ucs-4.2/ucs-4.2-0/services/univention-apache/debian/univention-apache.postrm b/branches/ucs-4.2/ucs-4.2-0/services/univention-apache/debian/univention-apache.postrm index 145911d..ff73e59 100644 --- a/branches/ucs-4.2/ucs-4.2-0/services/univention-apache/debian/univention-apache.postrm +++ b/branches/ucs-4.2/ucs-4.2-0/services/univention-apache/debian/univention-apache.postrm @@ -30,8 +30,6 @@ # /usr/share/common-licenses/AGPL-3; if not, see # . -dpkg-maintscript-helper rm_conffile /etc/univention/templates/files/etc/apache2/conf.d/ucs.conf -- $@ - if [ "$1" = "purge" ]; then rm -rf /etc/univention/apache fi diff --git a/branches/ucs-4.2/ucs-4.2-0/services/univention-apache/debian/univention-apache.preinst b/branches/ucs-4.2/ucs-4.2-0/services/univention-apache/debian/univention-apache.preinst deleted file mode 100644 index 4e01714..0000000 --- a/branches/ucs-4.2/ucs-4.2-0/services/univention-apache/debian/univention-apache.preinst +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/sh -# -# Univention Apache -# preinst script for the debian package -# -# Copyright 2016 Univention GmbH -# -# http://www.univention.de/ -# -# All rights reserved. -# -# The source code of this program is made available -# under the terms of the GNU Affero General Public License version 3 -# (GNU AGPL V3) as published by the Free Software Foundation. -# -# Binary versions of this program provided by Univention to you as -# well as other copyrighted, protected or trademarked materials like -# Logos, graphics, fonts, specific documentations and configurations, -# cryptographic keys etc. are subject to a license agreement between -# you and Univention and not subject to the GNU AGPL V3. -# -# In the case you use this program under the terms of the GNU AGPL V3, -# the program is provided in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public -# License with the Debian GNU/Linux or Univention distribution in file -# /usr/share/common-licenses/AGPL-3; if not, see -# . - -#DEBHELPER# - -dpkg-maintscript-helper rm_conffile /etc/univention/templates/files/etc/apache2/conf.d/ucs.conf -- $@ - -exit 0 -- 2.1.4 From d8b2cf261666b24415dbcbfd7a8a69e1765f6d6a Mon Sep 17 00:00:00 2001 Message-Id: In-Reply-To: <1dd0ba0f045b94641a6328b0b1536ceebcfce9a6.1473324089.git.hahn@univention.de> References: <1dd0ba0f045b94641a6328b0b1536ceebcfce9a6.1473324089.git.hahn@univention.de> From: Philipp Hahn Date: Thu, 8 Sep 2016 09:40:01 +0200 Subject: [PATCH 3/6] Bug #42196 apache: root Organization: Univention GmbH, Bremen, Germany is already configured in apache2.conf --- .../univention-apache/conffiles/etc/apache2/conf-available/ucs.conf | 5 ----- 1 file changed, 5 deletions(-) diff --git a/branches/ucs-4.2/ucs-4.2-0/services/univention-apache/conffiles/etc/apache2/conf-available/ucs.conf b/branches/ucs-4.2/ucs-4.2-0/services/univention-apache/conffiles/etc/apache2/conf-available/ucs.conf index 83f8ec9..4eed58c 100644 --- a/branches/ucs-4.2/ucs-4.2-0/services/univention-apache/conffiles/etc/apache2/conf-available/ucs.conf +++ b/branches/ucs-4.2/ucs-4.2-0/services/univention-apache/conffiles/etc/apache2/conf-available/ucs.conf @@ -10,11 +10,6 @@ ErrorLog /var/log/apache2/error.log # alert, emerg. LogLevel @%@apache2/loglevel@%@ - - Options +FollowSymLinks - AllowOverride None - - AllowOverride None Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch -- 2.1.4 From 2806cd19e55efbb6c26d2451edcb8e12bf4222ae Mon Sep 17 00:00:00 2001 Message-Id: <2806cd19e55efbb6c26d2451edcb8e12bf4222ae.1473324089.git.hahn@univention.de> In-Reply-To: <1dd0ba0f045b94641a6328b0b1536ceebcfce9a6.1473324089.git.hahn@univention.de> References: <1dd0ba0f045b94641a6328b0b1536ceebcfce9a6.1473324089.git.hahn@univention.de> From: Philipp Hahn Date: Thu, 8 Sep 2016 09:39:17 +0200 Subject: [PATCH 4/6] Bug #42196 apache: logging Organization: Univention GmbH, Bremen, Germany configuration belongs into site configuration; defaults are already configured in apache2.conf and conf-available/other-vhosts-access-log.conf. --- .../univention-apache/conffiles/etc/apache2/conf-available/ucs.conf | 2 -- .../conffiles/etc/apache2/ucs-sites.conf.d/ucs-sites.conf | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/branches/ucs-4.2/ucs-4.2-0/services/univention-apache/conffiles/etc/apache2/conf-available/ucs.conf b/branches/ucs-4.2/ucs-4.2-0/services/univention-apache/conffiles/etc/apache2/conf-available/ucs.conf index 4eed58c..290ba91 100644 --- a/branches/ucs-4.2/ucs-4.2-0/services/univention-apache/conffiles/etc/apache2/conf-available/ucs.conf +++ b/branches/ucs-4.2/ucs-4.2-0/services/univention-apache/conffiles/etc/apache2/conf-available/ucs.conf @@ -4,8 +4,6 @@ MaxClients @%@apache2/maxclients@%@ ServerAdmin webmaster@@%@hostname@%@.@%@domainname@%@ ServerSignature On -CustomLog /var/log/apache2/access.log combined -ErrorLog /var/log/apache2/error.log # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel @%@apache2/loglevel@%@ diff --git a/branches/ucs-4.2/ucs-4.2-0/services/univention-apache/conffiles/etc/apache2/ucs-sites.conf.d/ucs-sites.conf b/branches/ucs-4.2/ucs-4.2-0/services/univention-apache/conffiles/etc/apache2/ucs-sites.conf.d/ucs-sites.conf index 1e80b51..79b6817 100644 --- a/branches/ucs-4.2/ucs-4.2-0/services/univention-apache/conffiles/etc/apache2/ucs-sites.conf.d/ucs-sites.conf +++ b/branches/ucs-4.2/ucs-4.2-0/services/univention-apache/conffiles/etc/apache2/ucs-sites.conf.d/ucs-sites.conf @@ -6,6 +6,7 @@ ProxyPreserveHost on ProxyTimeout 600 DocumentRoot @%@apache2/documentroot@%@ +CustomLog /var/log/apache2/access.log combined @!@ print 'RedirectMatch ^/$ /%s' % baseConfig.get('apache2/startsite', 'ucs-overview') @!@ -- 2.1.4 From 15d62ccfa44c491f12875d0d8d2327142f2c92b5 Mon Sep 17 00:00:00 2001 Message-Id: <15d62ccfa44c491f12875d0d8d2327142f2c92b5.1473324089.git.hahn@univention.de> In-Reply-To: <1dd0ba0f045b94641a6328b0b1536ceebcfce9a6.1473324089.git.hahn@univention.de> References: <1dd0ba0f045b94641a6328b0b1536ceebcfce9a6.1473324089.git.hahn@univention.de> From: Philipp Hahn Date: Thu, 8 Sep 2016 09:37:49 +0200 Subject: [PATCH 5/6] Bug #42196 apache: cgi-bin Organization: Univention GmbH, Bremen, Germany is already configured by conf-available/serv-cgi-bin.conf --- .../conffiles/etc/apache2/conf-available/ucs.conf | 7 ------- .../conffiles/etc/apache2/ucs-sites.conf.d/ucs-sites.conf | 2 -- 2 files changed, 9 deletions(-) diff --git a/branches/ucs-4.2/ucs-4.2-0/services/univention-apache/conffiles/etc/apache2/conf-available/ucs.conf b/branches/ucs-4.2/ucs-4.2-0/services/univention-apache/conffiles/etc/apache2/conf-available/ucs.conf index 290ba91..18e47a3 100644 --- a/branches/ucs-4.2/ucs-4.2-0/services/univention-apache/conffiles/etc/apache2/conf-available/ucs.conf +++ b/branches/ucs-4.2/ucs-4.2-0/services/univention-apache/conffiles/etc/apache2/conf-available/ucs.conf @@ -8,13 +8,6 @@ ServerSignature On # alert, emerg. LogLevel @%@apache2/loglevel@%@ - - AllowOverride None - Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch - Order allow,deny - Allow from all - - Options +Indexes +FollowSymLinks +MultiViews @!@ diff --git a/branches/ucs-4.2/ucs-4.2-0/services/univention-apache/conffiles/etc/apache2/ucs-sites.conf.d/ucs-sites.conf b/branches/ucs-4.2/ucs-4.2-0/services/univention-apache/conffiles/etc/apache2/ucs-sites.conf.d/ucs-sites.conf index 79b6817..9542a80 100644 --- a/branches/ucs-4.2/ucs-4.2-0/services/univention-apache/conffiles/etc/apache2/ucs-sites.conf.d/ucs-sites.conf +++ b/branches/ucs-4.2/ucs-4.2-0/services/univention-apache/conffiles/etc/apache2/ucs-sites.conf.d/ucs-sites.conf @@ -1,5 +1,3 @@ -ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ - RewriteEngine on RewriteOptions Inherit ProxyPreserveHost on -- 2.1.4 From f81c8d5cbdcf731d1354cc90ca13f53bf333d973 Mon Sep 17 00:00:00 2001 Message-Id: In-Reply-To: <1dd0ba0f045b94641a6328b0b1536ceebcfce9a6.1473324089.git.hahn@univention.de> References: <1dd0ba0f045b94641a6328b0b1536ceebcfce9a6.1473324089.git.hahn@univention.de> From: Philipp Hahn Date: Thu, 8 Sep 2016 10:15:37 +0200 Subject: [PATCH 6/6] Bug #42196 apache: Move 000-default.conf Organization: Univention GmbH, Bremen, Germany --- .../etc/apache2/sites-available/000-default.d/00start | 5 +++++ .../conffiles/etc/apache2/sites-available/000-default.d/99end | 1 + .../conffiles/etc/apache2/sites-available/default.d/00start | 5 ----- .../conffiles/etc/apache2/sites-available/default.d/99end | 1 - .../univention-apache/debian/univention-apache.maintscript | 2 ++ .../debian/univention-apache.univention-config-registry | 10 +++++----- 6 files changed, 13 insertions(+), 11 deletions(-) create mode 100644 branches/ucs-4.2/ucs-4.2-0/services/univention-apache/conffiles/etc/apache2/sites-available/000-default.d/00start create mode 100644 branches/ucs-4.2/ucs-4.2-0/services/univention-apache/conffiles/etc/apache2/sites-available/000-default.d/99end delete mode 100644 branches/ucs-4.2/ucs-4.2-0/services/univention-apache/conffiles/etc/apache2/sites-available/default.d/00start delete mode 100644 branches/ucs-4.2/ucs-4.2-0/services/univention-apache/conffiles/etc/apache2/sites-available/default.d/99end diff --git a/branches/ucs-4.2/ucs-4.2-0/services/univention-apache/conffiles/etc/apache2/sites-available/000-default.d/00start b/branches/ucs-4.2/ucs-4.2-0/services/univention-apache/conffiles/etc/apache2/sites-available/000-default.d/00start new file mode 100644 index 0000000..03ee16d --- /dev/null +++ b/branches/ucs-4.2/ucs-4.2-0/services/univention-apache/conffiles/etc/apache2/sites-available/000-default.d/00start @@ -0,0 +1,5 @@ +@%@UCRWARNING=# @%@ + + + Include /etc/apache2/ucs-sites.conf.d + diff --git a/branches/ucs-4.2/ucs-4.2-0/services/univention-apache/conffiles/etc/apache2/sites-available/000-default.d/99end b/branches/ucs-4.2/ucs-4.2-0/services/univention-apache/conffiles/etc/apache2/sites-available/000-default.d/99end new file mode 100644 index 0000000..84035ef --- /dev/null +++ b/branches/ucs-4.2/ucs-4.2-0/services/univention-apache/conffiles/etc/apache2/sites-available/000-default.d/99end @@ -0,0 +1 @@ + diff --git a/branches/ucs-4.2/ucs-4.2-0/services/univention-apache/conffiles/etc/apache2/sites-available/default.d/00start b/branches/ucs-4.2/ucs-4.2-0/services/univention-apache/conffiles/etc/apache2/sites-available/default.d/00start deleted file mode 100644 index 03ee16d..0000000 --- a/branches/ucs-4.2/ucs-4.2-0/services/univention-apache/conffiles/etc/apache2/sites-available/default.d/00start +++ /dev/null @@ -1,5 +0,0 @@ -@%@UCRWARNING=# @%@ - - - Include /etc/apache2/ucs-sites.conf.d - diff --git a/branches/ucs-4.2/ucs-4.2-0/services/univention-apache/conffiles/etc/apache2/sites-available/default.d/99end b/branches/ucs-4.2/ucs-4.2-0/services/univention-apache/conffiles/etc/apache2/sites-available/default.d/99end deleted file mode 100644 index 84035ef..0000000 --- a/branches/ucs-4.2/ucs-4.2-0/services/univention-apache/conffiles/etc/apache2/sites-available/default.d/99end +++ /dev/null @@ -1 +0,0 @@ - diff --git a/branches/ucs-4.2/ucs-4.2-0/services/univention-apache/debian/univention-apache.maintscript b/branches/ucs-4.2/ucs-4.2-0/services/univention-apache/debian/univention-apache.maintscript index 4c28dd1..733966f 100644 --- a/branches/ucs-4.2/ucs-4.2-0/services/univention-apache/debian/univention-apache.maintscript +++ b/branches/ucs-4.2/ucs-4.2-0/services/univention-apache/debian/univention-apache.maintscript @@ -1 +1,3 @@ mv_conffile /etc/univention/templates/files/etc/apache2/conf.d/ucs.conf /etc/univention/templates/files/etc/apache2/conf-available/ucs.conf 9.0.1~ +mv_conffile /etc/apache2/sites-available/default.d/00start /etc/apache2/sites-available/000-default.d/00start 9.0.1~ +mv_conffile /etc/apache2/sites-available/default.d/99end /etc/apache2/sites-available/000-default.d/99end 9.0.1~ diff --git a/branches/ucs-4.2/ucs-4.2-0/services/univention-apache/debian/univention-apache.univention-config-registry b/branches/ucs-4.2/ucs-4.2-0/services/univention-apache/debian/univention-apache.univention-config-registry index 7b717a1..7327f25 100644 --- a/branches/ucs-4.2/ucs-4.2-0/services/univention-apache/debian/univention-apache.univention-config-registry +++ b/branches/ucs-4.2/ucs-4.2-0/services/univention-apache/debian/univention-apache.univention-config-registry @@ -12,15 +12,15 @@ Variables: apache2/startsite Variables: apache2/documentroot Type: multifile -Multifile: etc/apache2/sites-available/default.conf +Multifile: etc/apache2/sites-available/000-default.conf Type: subfile -Multifile: etc/apache2/sites-available/default.conf -Subfile: etc/apache2/sites-available/default.d/00start +Multifile: etc/apache2/sites-available/000-default.conf +Subfile: etc/apache2/sites-available/000-default.d/00start Type: subfile -Multifile: etc/apache2/sites-available/default.conf -Subfile: etc/apache2/sites-available/default.d/99end +Multifile: etc/apache2/sites-available/000-default.conf +Subfile: etc/apache2/sites-available/000-default.d/99end Type: file File: etc/apache2/mods-available/ssl.conf -- 2.1.4