diff --git a/apache2-httpd.conf b/apache2-httpd.conf
index 381e280..9e88d0f 100644
--- a/apache2-httpd.conf
+++ b/apache2-httpd.conf
@@ -37,6 +37,7 @@
# |-- mod_mime-defaults.conf . . . . . . . defaults for mod_mime configuration
# |-- errors.conf . . . . . . . . . . . . . customize error responses
# |-- ssl-global.conf . . . . . . . . . . . SSL conf that applies to default server _and all_ virtual hosts
+# |-- protocols.conf . . . . . . . . . . . Protocol settings that applies to default server _and all_ virtual hosts
# |
# |-- default-server.conf . . . . . . . . . set up the default server that replies to non-virtual-host requests
# | |--mod_userdir.conf . . . . . . . . enable UserDir (if mod_userdir is loaded)
@@ -76,6 +77,7 @@
# |-- mod_usertrack.conf
# |-- server-tuning.conf
# |-- ssl-global.conf
+# |-- protocols.conf
# |-- ssl.crl/ . . . . . . . . . . . . . . PEM-encoded X.509 Certificate Revocation Lists (CRL)
# |-- ssl.crt/ . . . . . . . . . . . . . . PEM-encoded X.509 Certificates
# |-- ssl.csr/ . . . . . . . . . . . . . . PEM-encoded X.509 Certificate Signing Requests
@@ -161,6 +163,10 @@ Include /etc/apache2/errors.conf
# any virtual host
Include /etc/apache2/ssl-global.conf
+# global (server-wide) protocol configuration, that is not specific
+# to any virtual host
+Include /etc/apache2/protocols.conf
+
# forbid access to the entire filesystem by default
Options None
diff --git a/apache2-protocols.conf b/apache2-protocols.conf
new file mode 100644
index 0000000..de2a2cd
--- /dev/null
+++ b/apache2-protocols.conf
@@ -0,0 +1,22 @@
+##
+## Protocol Global Context
+##
+## All Protocol related configuration in this context applies both to
+## the main server and all virtual hosts.
+##
+
+# These are the configuration directives to instruct the server how to
+# serve pages over an http2 connection. For detailing information about these
+# directives see
+#
+# Do NOT simply read the instructions in here without understanding
+# what they do. They're here only as hints or reminders. If you are unsure
+# consult the online docs. You have been warned.
+
+# This global SSL configuration is ignored if "HTTP2" is not defined.
+
+
+
+ Protocols h2 h2c http/1.1
+
+
diff --git a/apache2.changes b/apache2.changes
index ee2a9ee..a504391 100644
--- a/apache2.changes
+++ b/apache2.changes
@@ -1,3 +1,10 @@
+-------------------------------------------------------------------
+Tue Jan 10 22:00:14 UTC 2017 - jweberhofer@weberhofer.at
+
+- Added new HTTP2 option to sysconfig to ease enabling http2
+- Added new protocols.conf which is included globally
+- Enable http2 also for Leap 42.2+ and SLE12_SP2+
+
-------------------------------------------------------------------
Mon Jan 2 09:50:00 UTC 2017 - pgajdos@suse.com
diff --git a/apache2.spec b/apache2.spec
index 5b8184d..48a1956 100644
--- a/apache2.spec
+++ b/apache2.spec
@@ -42,6 +42,9 @@
%define platform_string Linux/SUSE
%define httpduser wwwrun
%define httpdgroup www
+#for some reason the parser barfs if not conditional
+%{?requires_ge:%requires_ge libapr1}
+%{?requires_ge:%requires_ge libapr-util1}
%if 0%{?suse_version} >= 1220
%define runtimedir /run
%define mods_static unixd systemd
@@ -49,7 +52,6 @@
%define runtimedir %{_localstatedir}/run
%define mods_static unixd
%endif
-
Name: apache2
Version: 2.4.25
Release: 0
@@ -101,6 +103,7 @@ Source115: apache2-mod_reqtimeout.conf
Source116: apache2-loadmodule.conf
Source117: apache2-global.conf
Source118: apache2-mod_cgid-timeout.conf
+Source119: apache2-protocols.conf
Source130: apache2-vhost.template
Source131: apache2-vhost-ssl.template
Source140: apache2-check_forensic
@@ -140,18 +143,21 @@ BuildRequires: lua-devel
BuildRequires: openldap2-devel
BuildRequires: openssl-devel >= 0.9.8a
BuildRequires: pcre-devel
+BuildRequires: pkgconfig
BuildRequires: xz
BuildRequires: zlib-devel
Requires: %{_sysconfdir}/mime.types
Requires: %{name}-MPM
-Suggests: apache2-%{default_mpm}
Requires: logrotate
-Requires(post): %insserv_prereq %fillup_prereq permissions pwdutils
+Requires(post): %insserv_prereq %fillup_prereq
Requires(post): %{name}-utils
Requires(post): fileutils
Requires(post): grep
+Requires(post): permissions
+Requires(post): pwdutils
Requires(post): sed
Requires(post): textutils
+Suggests: apache2-%{default_mpm}
Provides: %{apache_mmn}
Provides: %{name}-mod_macro = %{version}
Provides: http_daemon
@@ -163,17 +169,14 @@ Provides: apache = %{version}
Obsoletes: apache < 1.3.29
Obsoletes: mod_ssl < 2.8.16
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-#for some reason the parser barfs if not conditional
-%{?requires_ge:%requires_ge libapr1}
-%{?requires_ge:%requires_ge libapr-util1}
%{?systemd_requires}
%if 0%{?suse_version} >= 1210
BuildRequires: pkgconfig
BuildRequires: pkgconfig(libsystemd)
BuildRequires: pkgconfig(systemd)
%endif
-%if 0%{?suse_version} > 1320
-BuildRequires: pkgconfig(libnghttp2) >= 1.0.0
+%if 0%{?suse_version} > 1320 || 0%{?sle_version} >= 120200
+BuildRequires: pkgconfig(libnghttp2) >= 1.2.1
%endif
%description
@@ -192,9 +195,9 @@ http://httpd.apache.org/docs-2.4/upgrading.html.
Summary: Apache 2 worker MPM (Multi-Processing Module)
Group: Productivity/Networking/Web/Servers
Requires: %{name} = %{version}
-Provides: %{name}-MPM
# the post scriptlet sources /usr/share/apache2/script-helpers
Requires(post): %{name} = %{version}
+Provides: %{name}-MPM
%endif
%if %prefork
@@ -202,10 +205,10 @@ Requires(post): %{name} = %{version}
Summary: Apache 2 "prefork" MPM (Multi-Processing Module)
Group: Productivity/Networking/Web/Servers
Requires: %{name} = %{version}
-Provides: %{name}-MPM
-Provides: apache:%{_sbindir}/httpd
# the post scriptlet sources /usr/share/apache2/script-helpers
Requires(post): %{name} = %{version}
+Provides: %{name}-MPM
+Provides: apache:%{_sbindir}/httpd
%endif
%if %event
@@ -213,9 +216,9 @@ Requires(post): %{name} = %{version}
Summary: Apache 2 event MPM (Multi-Processing Module)
Group: Productivity/Networking/Web/Servers
Requires: %{name} = %{version}
-Provides: %{name}-MPM
# the post scriptlet sources /usr/share/apache2/script-helpers
Requires(post): %{name} = %{version}
+Provides: %{name}-MPM
%endif
%if %worker
@@ -307,8 +310,8 @@ to administrators of web servers in general.
%patch68 -p1
%patch69
%patch70 -p1
-# Systemd module enabling patch
-%if 0%{?suse_version} >= 1210
+# Systemd module enabling patch
+%if 0%{?suse_version} >= 1210
%patch109 -p1
%endif
%patch111 -p1
@@ -578,7 +581,8 @@ for i in default-server.conf \
server-tuning.conf \
mod_reqtimeout.conf \
mod_cgid-timeout.conf \
- ssl-global.conf
+ ssl-global.conf \
+ protocols.conf
do
install -m 644 $RPM_SOURCE_DIR/apache2-$i %{buildroot}/%{sysconfdir}/$i
done
@@ -722,10 +726,10 @@ rm -r %{buildroot}/%{sysconfdir}/extra # it is already in the documentation di
# and validate httpd.conf file
#
pushd %{buildroot}/%{sysconfdir}
-for i in *.conf; do
+for i in *.conf; do
# loadmodule.conf.test will be created later
- [ "$i" == loadmodule.conf ] && continue
- cp $i $i.test;
+ [ "$i" == loadmodule.conf ] && continue
+ cp $i $i.test;
done
sed -e 's+%{_libdir}+'%{buildroot}'%{_libdir}+' \
-e 's+%{_localstatedir}/run+'%{buildroot}'%{_localstatedir}/run+' \
@@ -760,13 +764,13 @@ mv %{buildroot}/%{sysconfdir}/original .
%defattr(-,root,root)
%doc INSTALL READM* LICENSE ABOUT_APACHE CHANGES
%doc support/SHA1
-%doc %{_mandir}/man?/apachectl.?.*
-%doc %{_mandir}/man?/apache2ctl.?.*
-%doc %{_mandir}/man?/htcacheclean.?.*
-%doc %{_mandir}/man?/httpd.?.*
-%doc %{_mandir}/man?/httpd2.?.*
-%doc %{_mandir}/man?/apxs.?.*
-%doc %{_mandir}/man?/apxs2.?.*
+%{_mandir}/man?/apachectl.?.*
+%{_mandir}/man?/apache2ctl.?.*
+%{_mandir}/man?/htcacheclean.?.*
+%{_mandir}/man?/httpd.?.*
+%{_mandir}/man?/httpd2.?.*
+%{_mandir}/man?/apxs.?.*
+%{_mandir}/man?/apxs2.?.*
%doc robots.txt
%doc printenv
%doc test-cgi
@@ -883,7 +887,7 @@ mv %{buildroot}/%{sysconfdir}/original .
%{_libdir}/%{name}-prefork/mod_filter.so
%{_libdir}/%{name}-prefork/mod_headers.so
%{_libdir}/%{name}-prefork/mod_heartmonitor.so
-%if 0%{?suse_version} > 1320
+%if 0%{?suse_version} > 1320 || 0%{?sle_version} >= 120200
%{_libdir}/%{name}-prefork/mod_http2.so
%endif
%{_libdir}/%{name}-prefork/mod_imagemap.so
@@ -1008,7 +1012,7 @@ mv %{buildroot}/%{sysconfdir}/original .
%{_libdir}/%{name}-worker/mod_filter.so
%{_libdir}/%{name}-worker/mod_headers.so
%{_libdir}/%{name}-worker/mod_heartmonitor.so
-%if 0%{?suse_version} > 1320
+%if 0%{?suse_version} > 1320 || 0%{?sle_version} >= 120200
%{_libdir}/%{name}-worker/mod_http2.so
%endif
%{_libdir}/%{name}-worker/mod_imagemap.so
@@ -1132,7 +1136,7 @@ mv %{buildroot}/%{sysconfdir}/original .
%{_libdir}/%{name}-event/mod_file_cache.so
%{_libdir}/%{name}-event/mod_filter.so
%{_libdir}/%{name}-event/mod_headers.so
-%if 0%{?suse_version} > 1320
+%if 0%{?suse_version} > 1320 || 0%{?sle_version} >= 120200
%{_libdir}/%{name}-event/mod_http2.so
%endif
%{_libdir}/%{name}-event/mod_heartmonitor.so
@@ -1226,23 +1230,23 @@ mv %{buildroot}/%{sysconfdir}/original .
%files utils
%defattr(-,root,root)
-%doc %{_mandir}/man?/ab.?.*
-%doc %{_mandir}/man?/ab2.?.*
-%doc %{_mandir}/man?/dbmmanage.?.*
-%doc %{_mandir}/man?/dbmmanage2.?.*
-%doc %{_mandir}/man?/htdbm.?.*
-%doc %{_mandir}/man?/htdbm2.?.*
-%doc %{_mandir}/man?/htdigest.?.*
-%doc %{_mandir}/man?/htdigest2.?.*
-%doc %{_mandir}/man?/htpasswd.?.*
-%doc %{_mandir}/man?/htpasswd2.?.*
-%doc %{_mandir}/man?/httxt2dbm.?.*
-%doc %{_mandir}/man?/logresolve.?.*
-%doc %{_mandir}/man?/logresolve2.?.*
-%doc %{_mandir}/man?/rotatelogs.?.*
-%doc %{_mandir}/man?/rotatelogs2.?.*
-%doc %{_mandir}/man?/suexec.?.*
-%doc %{_mandir}/man?/suexec2.?.*
+%{_mandir}/man?/ab.?.*
+%{_mandir}/man?/ab2.?.*
+%{_mandir}/man?/dbmmanage.?.*
+%{_mandir}/man?/dbmmanage2.?.*
+%{_mandir}/man?/htdbm.?.*
+%{_mandir}/man?/htdbm2.?.*
+%{_mandir}/man?/htdigest.?.*
+%{_mandir}/man?/htdigest2.?.*
+%{_mandir}/man?/htpasswd.?.*
+%{_mandir}/man?/htpasswd2.?.*
+%{_mandir}/man?/httxt2dbm.?.*
+%{_mandir}/man?/logresolve.?.*
+%{_mandir}/man?/logresolve2.?.*
+%{_mandir}/man?/rotatelogs.?.*
+%{_mandir}/man?/rotatelogs2.?.*
+%{_mandir}/man?/suexec.?.*
+%{_mandir}/man?/suexec2.?.*
%{_sbindir}/fcgistarter
%{_mandir}/man8/fcgistarter.8.*
%{_bindir}/check_forensic
@@ -1273,26 +1277,29 @@ mv %{buildroot}/%{sysconfdir}/original .
%if %{prefork}
#
+
%post prefork
# install /usr/sbin/httpd link
-if [ -f /usr/share/apache2/script-helpers ]; then
- # it might happen that apache2 including
- # /usr/share/apache2/script-helpers is not installed
+if [ -f %{_datadir}/apache2/script-helpers ]; then
+ # it might happen that apache2 including
+ # %{_datadir}/apache2/script-helpers is not installed
# yet even if apache2- has Requires(post): apache2
# because of circular dependency between apache2
# and apache2-MPM
- . /usr/share/apache2/script-helpers
+ . %{_datadir}/apache2/script-helpers
find_mpm
ln -sf $HTTPD_SBIN_BASE-$HTTPD_MPM $HTTPD_SBIN_BASE
fi
exit 0
#
+
%postun prefork
if [ $1 -eq 1 ]; then
%apache_request_restart
fi
exit 0
#
+
%posttrans prefork
%apache_restart_if_needed
exit 0
@@ -1302,24 +1309,26 @@ exit 0
%if %{worker}
%post worker
# install /usr/sbin/httpd link
-if [ -f /usr/share/apache2/script-helpers ]; then
- # it might happen that apache2 including
- # /usr/share/apache2/script-helpers is not installed
+if [ -f %{_datadir}/apache2/script-helpers ]; then
+ # it might happen that apache2 including
+ # %{_datadir}/apache2/script-helpers is not installed
# yet even if apache2- has Requires(post): apache2
# because of circular dependency between apache2
# and apache2-MPM
- . /usr/share/apache2/script-helpers
+ . %{_datadir}/apache2/script-helpers
find_mpm
ln -sf $HTTPD_SBIN_BASE-$HTTPD_MPM $HTTPD_SBIN_BASE
fi
exit 0
#
+
%postun worker
if [ $1 -eq 1 ]; then
%apache_request_restart
fi
exit 0
#
+
%posttrans worker
%apache_restart_if_needed
exit 0
@@ -1329,24 +1338,26 @@ exit 0
%if %{event}
%post event
# install /usr/sbin/httpd link
-if [ -f /usr/share/apache2/script-helpers ]; then
- # it might happen that apache2 including
- # /usr/share/apache2/script-helpers is not installed
+if [ -f %{_datadir}/apache2/script-helpers ]; then
+ # it might happen that apache2 including
+ # %{_datadir}/apache2/script-helpers is not installed
# yet even if apache2- has Requires(post): apache2
# because of circular dependency between apache2
# and apache2-MPM
- . /usr/share/apache2/script-helpers
+ . %{_datadir}/apache2/script-helpers
find_mpm
ln -sf $HTTPD_SBIN_BASE-$HTTPD_MPM $HTTPD_SBIN_BASE
fi
exit 0
#
+
%postun event
if [ $1 -eq 1 ]; then
%apache_request_restart
fi
exit 0
#
+
%posttrans event
%apache_restart_if_needed
exit 0
@@ -1384,7 +1395,7 @@ fi
%if 0%{?suse_version} <= 1130
%run_permissions
%else
-%set_permissions %{_sbindir}/suexec || echo "Please check /etc/permissions.local for settings of /usr/sbin/suexec2 ."
+%set_permissions %{_sbindir}/suexec || echo "Please check %{_sysconfdir}/permissions.local for settings of %{_sbindir}/suexec2 ."
%endif
# wwwadmin group existed in past remove after openSUSE-13.2 out of support scope
if grep -q "^wwwadmin:" %{_sysconfdir}/group; then
@@ -1400,7 +1411,7 @@ fi
%endif
# install /usr/bin/httpd link (the code here is
# needed when apache2 was installed after apache2-)
-. /usr/share/apache2/script-helpers
+. %{_datadir}/apache2/script-helpers
find_mpm
if [ -n "$HTTPD_MPM" ]; then
ln -sf $HTTPD_SBIN_BASE-$HTTPD_MPM $HTTPD_SBIN_BASE
@@ -1410,6 +1421,7 @@ exit 0
%posttrans
%{_datadir}/%{name}/apache-22-24-upgrade
+
%verifyscript
%verify_permissions -e %{_sbindir}/suexec
%apache_restart_if_needed
diff --git a/sysconfig.apache2 b/sysconfig.apache2
index 1f81b69..59ea115 100644
--- a/sysconfig.apache2
+++ b/sysconfig.apache2
@@ -105,7 +105,7 @@ APACHE_MODULES="actions alias auth_basic authn_file authz_host authz_groupfile a
# (e.g. via rcapache2 start -DReverseProxy)
#
# Example:
-# "SSL STATUS AWSTATS SVN_VIEWCVS no_subversion_today"
+# "SSL HTTP2 STATUS AWSTATS SVN_VIEWCVS no_subversion_today"
#
APACHE_SERVER_FLAGS=""