From f705f4ca8506a43db85010e7fdafe7b48c3e8bba82843c142cd19c7c6d4479e4 Mon Sep 17 00:00:00 2001 From: OBS User buildservice-autocommit Date: Wed, 9 Dec 2020 08:01:33 +0000 Subject: [PATCH 1/4] Updating link to change in openSUSE:Factory/apache2 revision 176.0 OBS-URL: https://build.opensuse.org/package/show/Apache/apache2?expand=0&rev=c5644643ca247c796778851a166e34d4 --- apache2.changes | 6 ++++++ apache2.spec | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/apache2.changes b/apache2.changes index 5f4cd38..77e57be 100644 --- a/apache2.changes +++ b/apache2.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Dec 9 08:00:12 UTC 2020 - Dominique Leuenberger + +- Require /usr/bin/which instead of which: allow usage of busybox + variant for containers. + ------------------------------------------------------------------- Mon Dec 7 14:08:42 UTC 2020 - pgajdos@suse.com diff --git a/apache2.spec b/apache2.spec index 091bed6..e67595d 100644 --- a/apache2.spec +++ b/apache2.spec @@ -279,7 +279,7 @@ Requires(pre): user(wwwrun) %{?systemd_ordering} %endif %if "%{flavor}" == "utils" -Requires: which +Requires: /usr/bin/which Recommends: w3m %endif %if "%{flavor}" == "devel" From c71aa0c8773abeab9c12f1e6223e7fc9f7e8bf7eb7cb150f321be3f3a6b33d08 Mon Sep 17 00:00:00 2001 From: Petr Gajdos Date: Wed, 9 Dec 2020 19:36:41 +0000 Subject: [PATCH 2/4] - apxs -q PREFIX now returns /srv/www again OBS-URL: https://build.opensuse.org/package/show/Apache/apache2?expand=0&rev=633 --- apache2.changes | 5 +++++ apache2.spec | 1 + 2 files changed, 6 insertions(+) diff --git a/apache2.changes b/apache2.changes index 77e57be..fe0e83b 100644 --- a/apache2.changes +++ b/apache2.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Dec 9 19:36:02 UTC 2020 - pgajdos@suse.com + +- apxs -q PREFIX now returns /srv/www again + ------------------------------------------------------------------- Wed Dec 9 08:00:12 UTC 2020 - Dominique Leuenberger diff --git a/apache2.spec b/apache2.spec index e67595d..c2ee03e 100644 --- a/apache2.spec +++ b/apache2.spec @@ -369,6 +369,7 @@ EOF # there does not exist as configure switches), so # override them back %configure \ + --prefix=%{datadir} \ --libexecdir=%{libexecdir} \ --includedir=%{includedir} \ --sysconfdir=%{sysconfdir} \ From 59be197be77aaa183ed2ef5c80f4ccb8375cdf6cf3939a7d8b015f9dbb435066 Mon Sep 17 00:00:00 2001 From: Petr Gajdos Date: Thu, 10 Dec 2020 16:46:55 +0000 Subject: [PATCH 3/4] - actually install suse provided READMEs - install upstream configuration example - added sources + apache2-README-configuration.txt OBS-URL: https://build.opensuse.org/package/show/Apache/apache2?expand=0&rev=634 --- apache2-README-configuration.txt | 27 +++++++++++++++++++++++++++ apache2.changes | 8 ++++++++ apache2.spec | 11 +++++++++-- 3 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 apache2-README-configuration.txt diff --git a/apache2-README-configuration.txt b/apache2-README-configuration.txt new file mode 100644 index 0000000..2136144 --- /dev/null +++ b/apache2-README-configuration.txt @@ -0,0 +1,27 @@ +httpd configuration @ SUSE +========================== + +`httpd` command can stand for `httpd-prefork`, `httpd-worker` +and `httpd-event`, depending on which httpd mpm rpm package is +installed. In case more such mpm packages are installed, `httpd` +points to one with higher priority defined in update alternatives. + +There are several levels of configuration possible: + +1. systemctl start apache2 +When httpd is run trough systemctl service, /etc/apache2/httpd.conf +is used as a base and sysconfig varibables translated into +/etc/apache2/sysconfig.d/ used. + +2. httpd -f /etc/apache2/httpd.conf +/etc/apache2/httpd.conf can be used directly, without systemd +assistance. /etc/apache2/sysconfig.d is not included in that +case. + +3. httpd -f /usr/share/doc/package/apache2/conf/httpd.conf +It is possible to experiment with upstream example +configuration. Do not forgot + +For more configuration tips, install documentation package +apache-rex. + diff --git a/apache2.changes b/apache2.changes index fe0e83b..ac5e7d9 100644 --- a/apache2.changes +++ b/apache2.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Thu Dec 10 16:45:36 UTC 2020 - pgajdos@suse.com + +- actually install suse provided READMEs +- install upstream configuration example +- added sources + + apache2-README-configuration.txt + ------------------------------------------------------------------- Wed Dec 9 19:36:02 UTC 2020 - pgajdos@suse.com diff --git a/apache2.spec b/apache2.spec index c2ee03e..2b825d3 100644 --- a/apache2.spec +++ b/apache2.spec @@ -178,6 +178,7 @@ Source191: apache2-vhost-ssl.template # READMEs and other documentation Source200: apache2-README-access_compat.txt Source201: apache2-README-instances.txt +Source202: apache2-README-configuration.txt # layout of system dirs configuration, may be upstreamed Patch0: apache2-system-dirs-layout.patch # apachectl is frontend for start_apache2, suse specific @@ -507,7 +508,7 @@ mkdir -p %{buildroot}%{logfiledir} \ # save MODULE_MAGIC_NUMBER mkdir -p %{buildroot}/%{_libexecdir} -cat > %{buildroot}/%{_libexecdir}/%{name}_MMN <<-EOF +cat > %{buildroot}/%{_libexecdir}/apache2_MMN <<-EOF #!/bin/sh echo %{apache_mmn} EOF @@ -590,10 +591,15 @@ ln -sf ../mime.types %{buildroot}/%{sysconfdir}/mime.types make DESTDIR=%{buildroot} install-icons make DESTDIR=%{buildroot} install-error +make DESTDIR=%{buildroot} sysconfdir=%{_docdir}/apache2/conf install-conf mkdir -p %{buildroot}%{_mandir}/man8/ install -D -m 644 docs/man/suexec.8 %{buildroot}%{_mandir}/man8/ install -D -m 644 docs/man/httpd.8 %{buildroot}%{_mandir}/man8/ + +cp %{SOURCE200} README-access_compat.txt +cp %{SOURCE201} README-instances.txt +cp %{SOURCE202} README-configuration.txt %endif # utils install @@ -827,7 +833,7 @@ exit 0 %attr(750,%{httpduser},root) %dir %{localstatedir} %dir %{libexecdir} %dir %{_libexecdir} -%attr(755,root,root) %{_libexecdir}/%{name}_MMN +%attr(755,root,root) %{_libexecdir}/apache2_MMN %dir %{sysconfdir} %config %{sysconfdir}/magic %config %{sysconfdir}/mime.types @@ -870,6 +876,7 @@ exit 0 %{_mandir}/man8/httpd.8.* %{_mandir}/man8/suexec.8.* %doc support/SHA1 +%{_docdir}/apache2/conf %endif # utils files From 50bc75ffe38e6154b1355c72c95c2ee42c0d8cae34bd716215616853b1ece390 Mon Sep 17 00:00:00 2001 From: Petr Gajdos Date: Fri, 11 Dec 2020 20:06:07 +0000 Subject: [PATCH 4/4] - added https://httpd.apache.org/server-status like server status (configured by APACHE_EXTENDED_STATUS="lua") - modified sources % apache2-mod_status.conf % apache2-start_apache2 % sysconfig.apache2 OBS-URL: https://build.opensuse.org/package/show/Apache/apache2?expand=0&rev=635 --- apache2-mod_status.conf | 36 ++++++++++++++++++++++++------------ apache2-start_apache2 | 6 +++++- apache2.changes | 10 ++++++++++ apache2.spec | 2 ++ sysconfig.apache2 | 8 +++++--- 5 files changed, 46 insertions(+), 16 deletions(-) diff --git a/apache2-mod_status.conf b/apache2-mod_status.conf index 7d11e64..e09657b 100644 --- a/apache2-mod_status.conf +++ b/apache2-mod_status.conf @@ -5,16 +5,28 @@ # see https://httpd.apache.org/docs/2.4/mod/mod_status.html # - - SetHandler server-status - - Require local - - - Order deny,allow - Deny from all - Allow from localhost - - + + + AddHandler lua-script .lua + LuaMapHandler ^/server-status/?$ /usr/share/apache2/lua-server-status/server-status.lua + + + + + ExtendedStatus on + + + SetHandler server-status + + + + + Require local + + + Order deny,allow + Deny from all + Allow from localhost + + - diff --git a/apache2-start_apache2 b/apache2-start_apache2 index 60a9bd9..e302fce 100644 --- a/apache2-start_apache2 +++ b/apache2-start_apache2 @@ -143,7 +143,11 @@ if [ -n "$APACHE_SERVERTOKENS" ]; then fi # APACHE_EXTENDED_STATUS -> global.conf if [ -n "$APACHE_EXTENDED_STATUS" ]; then - echo "ExtendedStatus $APACHE_EXTENDED_STATUS" >> ${sysconfd_dir}/global.conf + if [ "$APACHE_EXTENDED_STATUS" == "lua" ]; then + server_flags="$server_flags -DLUA_STATUS" + elif [ "$APACHE_EXTENDED_STATUS" == "on" ]; then + server_flags="$server_flags -DEXTENDED_STATUS" + fi fi # APACHE_MODULES -> loadmodule.conf get_module_list diff --git a/apache2.changes b/apache2.changes index ac5e7d9..193482f 100644 --- a/apache2.changes +++ b/apache2.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Fri Dec 11 20:01:03 UTC 2020 - pgajdos@suse.com + +- added https://httpd.apache.org/server-status like server status + (configured by APACHE_EXTENDED_STATUS="lua") +- modified sources + % apache2-mod_status.conf + % apache2-start_apache2 + % sysconfig.apache2 + ------------------------------------------------------------------- Thu Dec 10 16:45:36 UTC 2020 - pgajdos@suse.com diff --git a/apache2.spec b/apache2.spec index 2b825d3..6bf7360 100644 --- a/apache2.spec +++ b/apache2.spec @@ -593,6 +593,8 @@ make DESTDIR=%{buildroot} install-icons make DESTDIR=%{buildroot} install-error make DESTDIR=%{buildroot} sysconfdir=%{_docdir}/apache2/conf install-conf +cp -r docs/server-status %{buildroot}%{_datadir}/apache2/lua-server-status + mkdir -p %{buildroot}%{_mandir}/man8/ install -D -m 644 docs/man/suexec.8 %{buildroot}%{_mandir}/man8/ install -D -m 644 docs/man/httpd.8 %{buildroot}%{_mandir}/man8/ diff --git a/sysconfig.apache2 b/sysconfig.apache2 index fb7b4d8..13eb14f 100644 --- a/sysconfig.apache2 +++ b/sysconfig.apache2 @@ -96,7 +96,6 @@ APACHE_MODULES="actions alias auth_basic authn_core authn_file authz_host authz_ # something temporarily. # # Notably, to enable ssl support, 'SSL' needs to be added here. -# To enable the server-status, 'STATUS' needs to be added here. # # It does not matter if you write flag1, -D flag1 or -Dflag1. # Multiple flags can be given as "-D flag1 -D flag2" or simply "flag1 flag2". @@ -105,7 +104,7 @@ APACHE_MODULES="actions alias auth_basic authn_core authn_file authz_host authz_ # (e.g. via rcapache2 start -DReverseProxy) # # Example: -# "SSL HTTP2 STATUS AWSTATS SVN_VIEWCVS no_subversion_today" +# "SSL HTTP2 AWSTATS SVN_VIEWCVS no_subversion_today" # APACHE_SERVER_FLAGS="" @@ -242,7 +241,7 @@ APACHE_USE_CANONICAL_NAME="off" # APACHE_SERVERTOKENS="ProductOnly" -## Type: list(on,off) +## Type: list(on,off,lua) ## Default: "off" ## ServiceReload: apache2 # @@ -250,6 +249,9 @@ APACHE_SERVERTOKENS="ProductOnly" # CPU usage, in the status report. It is a server-wide setting, and it can cost # some performance! # +# Server status GUI written in lua (see https://www.apache.org/server-status +# for an example) requires both mod_status and mod_lua to be loaded. +# APACHE_EXTENDED_STATUS="off"