forked from pool/apache2
- package reworked trough [bsc#1178478]
- modified patches % apache2-mod_proxy_uwsgi-fix-crash.patch (refreshed) - modified sources % apache2-loadmodule.conf % apache2-manual.conf % apache2-script-helpers % apache2@.service % sysconfig.apache2 - deleted patches - deprecated-scripts-arch.patch (not needed) - httpd-2.0.54-envvars.dif (not needed) - httpd-2.1.3alpha-layout.dif (renamed to apache2-system-dirs-layout.patch) - httpd-2.2.0-apxs-a2enmod.dif (not needed) - httpd-2.4.9-bnc690734.patch (renamed to apache2-LimitRequestFieldSize-limits-headers.patch) - httpd-2.4.x-fate317766-config-control-two-protocol-options.diff (renamed to apache2-HttpContentLengthHeadZero-HttpExpectStrict.patch) - httpd-2.x.x-logresolve.patch (renamed to apache2-logresolve-tmp-security.patch) - httpd-apachectl.patch (renamed to apache2-apachectl.patch) - httpd-implicit-pointer-decl.patch (not needed) - httpd-visibility.patch (not needed) - deleted sources - SUSE-NOTICE (outdated) - a2enflag (renamed to apache2-a2enflag) - a2enmod (renamed to apache2-a2enmod) - apache-22-24-upgrade (outdated) OBS-URL: https://build.opensuse.org/package/show/Apache/apache2?expand=0&rev=624
This commit is contained in:
parent
b1477a5f7b
commit
02a733cd83
13
SUSE-NOTICE
13
SUSE-NOTICE
@ -1,13 +0,0 @@
|
||||
|
||||
The SUSE build of apache2 contains the following modifications:
|
||||
* assert HAVE_POLL during compilation (safety measure)
|
||||
* small fixes in apachectl to make it work with multiple MPMs, and
|
||||
use w3m alternatively to lynx
|
||||
* avoid error if compiled with openssl 0.9.6e
|
||||
* added patch to experimental caching module that fixes segfault for 'GET
|
||||
https://whatever.html HTTP/1.0' request on HTTP Port
|
||||
(/modules/experimental/cache_util.c)
|
||||
* RFC 2817 TLS upgrade backported from 2.1
|
||||
* fixed log_server_status to use Socket.pm and match our configuration
|
||||
* fixed check_forensic script (adjusted for GNU tools, use safe tmpdir)
|
||||
* http://www.apache.org/dist/httpd/patches/apply_to_2.0.52/util_ldap_cache_mgr.c.patch
|
14
_multibuild
Normal file
14
_multibuild
Normal file
@ -0,0 +1,14 @@
|
||||
<multibuild>
|
||||
<package>mpm_event</package>
|
||||
<package>mpm_worker</package>
|
||||
<package>mpm_prefork</package>
|
||||
<package>utils</package>
|
||||
<package>devel</package>
|
||||
<package>manual</package>
|
||||
<package>test_mpm_event</package>
|
||||
<package>test_mpm_worker</package>
|
||||
<package>test_mpm_prefork</package>
|
||||
<package>test_devel</package>
|
||||
<package>test_main</package>
|
||||
</multibuild>
|
||||
|
@ -1,22 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# obsolete 2.2 modules -> 2.4 modules
|
||||
|
||||
for module in mod_authn_default mod_authz_default mod_mem_cache authz_default authn_default mem_cache; do
|
||||
if /usr/sbin/a2enmod -q "$module"; then
|
||||
echo "!!ATTENTION! $module was removed from apache version 2.4 or later, CHECK YOUR CONFIGURATION!!!"
|
||||
/usr/sbin/a2dismod "$module"
|
||||
fi
|
||||
done
|
||||
|
||||
if ! /usr/sbin/a2enmod -q authn_core; then
|
||||
/usr/sbin/a2enmod authn_core
|
||||
fi
|
||||
|
||||
if ! /usr/sbin/a2enmod -q authz_core; then
|
||||
/usr/sbin/a2enmod authz_core
|
||||
fi
|
||||
|
||||
if ! /usr/sbin/a2enmod -q log_config; then
|
||||
/usr/sbin/a2enmod log_config
|
||||
fi
|
12
apache-test-application-xml-type.patch
Normal file
12
apache-test-application-xml-type.patch
Normal file
@ -0,0 +1,12 @@
|
||||
Index: httpd-framework/t/conf/extra.conf.in
|
||||
===================================================================
|
||||
--- a/httpd-framework/t/conf/extra.conf.in 2020-06-15 10:43:26.156701553 +0200
|
||||
+++ b/httpd-framework/t/conf/extra.conf.in 2020-06-15 10:46:16.141693081 +0200
|
||||
@@ -875,6 +875,7 @@ LimitRequestFields 32
|
||||
</IfModule>
|
||||
</Directory>
|
||||
<Directory @SERVERROOT@/htdocs/modules/filter/bytype>
|
||||
+ AddType application/xml .xml
|
||||
<IfModule mod_deflate.c>
|
||||
AddOutputFilterByType DEFLATE application/xml
|
||||
AddOutputFilterByType DEFLATE text/xml
|
14
apache-test-turn-off-variables-in-ssl-var-lookup.patch
Normal file
14
apache-test-turn-off-variables-in-ssl-var-lookup.patch
Normal file
@ -0,0 +1,14 @@
|
||||
Index: httpd-framework/t/ssl/varlookup.t
|
||||
===================================================================
|
||||
--- a/httpd-framework/t/ssl/varlookup.t 2016-10-25 14:30:54.250707932 +0200
|
||||
+++ b/httpd-framework/t/ssl/varlookup.t 2016-10-27 15:38:52.440667690 +0200
|
||||
@@ -210,9 +210,7 @@ SSL_SERVER_S_DN_UID
|
||||
SSL_CLIENT_S_DN_Email "$client_dn{$email_field}"
|
||||
SSL_SERVER_S_DN_Email "$server_dn{$email_field}"
|
||||
SSL_CLIENT_SAN_Email_0 "$san_email"
|
||||
-SSL_SERVER_SAN_DNS_0 "$san_dns"
|
||||
SSL_CLIENT_SAN_OTHER_msUPN_0 "$san_msupn"
|
||||
-SSL_SERVER_SAN_OTHER_dnsSRV_0 "$san_dnssrv"
|
||||
|
||||
SSL_CLIENT_I_DN "$client_i_dn"
|
||||
SSL_SERVER_I_DN "$server_i_dn"
|
@ -42,11 +42,11 @@ Conflicts:
|
||||
server/protocol.c | 25 +++++++++++++++++--------
|
||||
6 files changed, 77 insertions(+), 10 deletions(-)
|
||||
|
||||
Index: httpd-2.4.26/modules/http/http_filters.c
|
||||
Index: httpd-2.4.46/modules/http/http_filters.c
|
||||
===================================================================
|
||||
--- httpd-2.4.26.orig/modules/http/http_filters.c 2017-01-09 22:17:08.000000000 +0100
|
||||
+++ httpd-2.4.26/modules/http/http_filters.c 2017-06-19 13:02:30.698399025 +0200
|
||||
@@ -1472,10 +1472,17 @@ AP_CORE_DECLARE_NONSTD(apr_status_t) ap_
|
||||
--- httpd-2.4.46.orig/modules/http/http_filters.c 2020-07-08 13:09:13.000000000 +0200
|
||||
+++ httpd-2.4.46/modules/http/http_filters.c 2020-11-10 16:16:44.663449886 +0100
|
||||
@@ -1483,10 +1483,17 @@ AP_CORE_DECLARE_NONSTD(apr_status_t) ap_
|
||||
* zero C-L to the client. We can't just remove the C-L filter,
|
||||
* because well behaved 2.0 handlers will send their data down the stack,
|
||||
* and we will compute a real C-L for the head request. RBB
|
||||
@ -65,11 +65,11 @@ Index: httpd-2.4.26/modules/http/http_filters.c
|
||||
apr_table_unset(r->headers_out, "Content-Length");
|
||||
}
|
||||
|
||||
Index: httpd-2.4.26/server/core.c
|
||||
Index: httpd-2.4.46/server/core.c
|
||||
===================================================================
|
||||
--- httpd-2.4.26.orig/server/core.c 2016-12-05 15:34:29.000000000 +0100
|
||||
+++ httpd-2.4.26/server/core.c 2017-06-19 12:54:26.353988343 +0200
|
||||
@@ -528,6 +528,12 @@ static void *merge_core_server_configs(a
|
||||
--- httpd-2.4.46.orig/server/core.c 2020-07-03 21:53:37.000000000 +0200
|
||||
+++ httpd-2.4.46/server/core.c 2020-11-10 16:16:44.695450065 +0100
|
||||
@@ -530,6 +530,12 @@ static void *merge_core_server_configs(a
|
||||
if (virt->http_methods != AP_HTTP_METHODS_UNSET)
|
||||
conf->http_methods = virt->http_methods;
|
||||
|
||||
@ -82,7 +82,7 @@ Index: httpd-2.4.26/server/core.c
|
||||
/* no action for virt->accf_map, not allowed per-vhost */
|
||||
|
||||
if (virt->protocol)
|
||||
@@ -3955,6 +3961,32 @@ static const char *set_http_method(cmd_p
|
||||
@@ -4034,6 +4040,32 @@ static const char *set_http_method(cmd_p
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -115,7 +115,7 @@ Index: httpd-2.4.26/server/core.c
|
||||
static apr_hash_t *errorlog_hash;
|
||||
|
||||
static int log_constant_item(const ap_errorlog_info *info, const char *arg,
|
||||
@@ -4474,6 +4506,10 @@ AP_INIT_TAKE1("TraceEnable", set_trace_e
|
||||
@@ -4567,6 +4599,10 @@ AP_INIT_TAKE1("TraceEnable", set_trace_e
|
||||
"'on' (default), 'off' or 'extended' to trace request body content"),
|
||||
AP_INIT_FLAG("MergeTrailers", set_merge_trailers, NULL, RSRC_CONF,
|
||||
"merge request trailers into request headers or not"),
|
||||
@ -126,11 +126,11 @@ Index: httpd-2.4.26/server/core.c
|
||||
AP_INIT_ITERATE("Protocols", set_protocols, NULL, RSRC_CONF,
|
||||
"Controls which protocols are allowed"),
|
||||
AP_INIT_TAKE1("ProtocolsHonorOrder", set_protocols_honor_order, NULL, RSRC_CONF,
|
||||
Index: httpd-2.4.26/server/protocol.c
|
||||
Index: httpd-2.4.46/server/protocol.c
|
||||
===================================================================
|
||||
--- httpd-2.4.26.orig/server/protocol.c 2017-05-30 14:27:41.000000000 +0200
|
||||
+++ httpd-2.4.26/server/protocol.c 2017-06-19 12:54:26.353988343 +0200
|
||||
@@ -1416,14 +1416,23 @@ request_rec *ap_read_request(conn_rec *c
|
||||
--- httpd-2.4.46.orig/server/protocol.c 2020-07-08 13:09:13.000000000 +0200
|
||||
+++ httpd-2.4.46/server/protocol.c 2020-11-10 16:16:44.695450065 +0100
|
||||
@@ -1502,14 +1502,23 @@ request_rec *ap_read_request(conn_rec *c
|
||||
r->expecting_100 = 1;
|
||||
}
|
||||
else {
|
||||
@ -162,10 +162,10 @@ Index: httpd-2.4.26/server/protocol.c
|
||||
}
|
||||
}
|
||||
|
||||
Index: httpd-2.4.26/include/http_core.h
|
||||
Index: httpd-2.4.46/include/http_core.h
|
||||
===================================================================
|
||||
--- httpd-2.4.26.orig/include/http_core.h 2016-12-05 15:34:29.000000000 +0100
|
||||
+++ httpd-2.4.26/include/http_core.h 2017-06-19 12:54:26.353988343 +0200
|
||||
--- httpd-2.4.46.orig/include/http_core.h 2019-03-18 09:49:59.000000000 +0100
|
||||
+++ httpd-2.4.46/include/http_core.h 2020-11-10 16:16:44.695450065 +0100
|
||||
@@ -723,6 +723,16 @@ typedef struct {
|
||||
#define AP_MERGE_TRAILERS_DISABLE 2
|
||||
int merge_trailers;
|
@ -1,8 +1,8 @@
|
||||
Index: server/util_script.c
|
||||
Index: httpd-2.4.46/server/util_script.c
|
||||
===================================================================
|
||||
--- server/util_script.c.orig
|
||||
+++ server/util_script.c
|
||||
@@ -448,11 +448,20 @@ AP_DECLARE(int) ap_scan_script_header_er
|
||||
--- httpd-2.4.46.orig/server/util_script.c 2020-07-20 07:58:49.000000000 +0200
|
||||
+++ httpd-2.4.46/server/util_script.c 2020-11-10 16:10:54.525476516 +0100
|
||||
@@ -468,11 +468,20 @@ AP_DECLARE(int) ap_scan_script_header_er
|
||||
apr_table_t *cookie_table;
|
||||
int trace_log = APLOG_R_MODULE_IS_LEVEL(r, module_index, APLOG_TRACE1);
|
||||
int first_header = 1;
|
||||
@ -24,7 +24,7 @@ Index: server/util_script.c
|
||||
|
||||
/* temporary place to hold headers to merge in later */
|
||||
merge = apr_table_make(r->pool, 10);
|
||||
@@ -468,7 +477,7 @@ AP_DECLARE(int) ap_scan_script_header_er
|
||||
@@ -488,7 +497,7 @@ AP_DECLARE(int) ap_scan_script_header_er
|
||||
|
||||
while (1) {
|
||||
|
||||
@ -33,7 +33,7 @@ Index: server/util_script.c
|
||||
if (rv == 0) {
|
||||
const char *msg = "Premature end of script headers";
|
||||
if (first_header)
|
||||
@@ -583,10 +592,13 @@ AP_DECLARE(int) ap_scan_script_header_er
|
||||
@@ -603,10 +612,13 @@ AP_DECLARE(int) ap_scan_script_header_er
|
||||
if (!(l = strchr(w, ':'))) {
|
||||
if (!buffer) {
|
||||
/* Soak up all the script output - may save an outright kill */
|
114
apache2-README
114
apache2-README
@ -1,114 +0,0 @@
|
||||
README.SuSE for Apache 2
|
||||
|
||||
|
||||
For The Impatient
|
||||
=================
|
||||
|
||||
o There are several MPM packages (MPM = multiprocessing module, which implements
|
||||
the threads/processes model). The MPM packages contain the actual apache binary.
|
||||
At least one MPM package must be installed.
|
||||
|
||||
o The apache v1 and v2 packages can be installed and run side by side :)
|
||||
|
||||
o Some commands have a "2" suffix, and are thus easily confused with Apache 1
|
||||
commands -- if you have an old apache (1.3) installation around.
|
||||
|
||||
o Edit /etc/sysconfig/apache2 to configure the list of modules to load, and other things.
|
||||
It is no longer required to run SuSEconfig after such changes. (In fact, the
|
||||
SuSEconfig.apache2 does no longer exist.)
|
||||
|
||||
|
||||
o For building apache modules, there are 4 apxs commands (all come with the
|
||||
apache2-devel package):
|
||||
apxs2 builds a common module for all MPMs and installs to /usr/lib/apache2
|
||||
apxs2-prefork builds for prefork and installs to /usr/lib/apache2-prefork
|
||||
apxs2-worker builds for worker and installs to /usr/lib/apache2-worker
|
||||
|
||||
If you build apache modules, the configure script might not find apxs, and
|
||||
you'll need an option like --with-apxs=apxs2[-worker, ...], or of course you can set
|
||||
a symlink to apxs2.
|
||||
|
||||
o The Apache Runtime (APR) is in the "libapr0" package (this package was named "apr"
|
||||
in the past (8.1))
|
||||
|
||||
|
||||
Choosing the right MPM for your application
|
||||
===========================================
|
||||
|
||||
apache2-prefork is implemented with a prefork regime, while
|
||||
apache2-worker uses a hybrid threaded/preforked model.
|
||||
|
||||
Which one to use? The short answer is:
|
||||
- if in doubt, simply use prefork
|
||||
- use prefork if you use mod_php4
|
||||
- use worker if you need maximal performance with (possibly) less resources
|
||||
(smaller memory footprint of threade compared to the same number as processes)
|
||||
|
||||
The following nice article has a more in depth answer:
|
||||
http://www.onlamp.com/pub/a/apache/2004/06/17/apacheckbk.html
|
||||
|
||||
See
|
||||
http://httpd.apache.org/docs/2.4/mpm.html and
|
||||
http://httpd.apache.org/docs/2.4/misc/perf-tuning.html#compiletime
|
||||
for more technical details.
|
||||
|
||||
In general, using a threaded MPM (worker) requires that all libraries that are
|
||||
loaded into apache (and libraries loaded by them in turn) be threadsafe as well.
|
||||
See
|
||||
http://httpd.apache.org/docs/2.4/developer/thread_safety.html for a status on
|
||||
some libraries.
|
||||
|
||||
|
||||
Upgrading from apache 1.3
|
||||
=========================
|
||||
|
||||
For a smooth transition from apache 1.3, apache 2 is installable alongside apache
|
||||
1.3. There are a few modules for apache 1 that have not been ported or enough
|
||||
tested for apache 2, but most important modules are available by now.
|
||||
|
||||
The mechanism of specifying modules to load into the server has been cleaned up
|
||||
so a reasonable default set of modules is loaded. (It is not useful to load all
|
||||
available modules by default, it would make the server quite big and slow. This
|
||||
is important given as the number of modules in the apache base distribution is
|
||||
rising and rising (about 50 at this time).
|
||||
|
||||
In previous apache packages (1.3), modules were activated by setting a
|
||||
APACHE_MOD_XYZ variable to "yes" and running SuSEconfig.
|
||||
Nowadays, modules are activated by adding them to a the APACHE_MODULES
|
||||
variable in /etc/sysconfig/apache2, and simply restarting apache.
|
||||
|
||||
|
||||
Building modules for apache 2
|
||||
=============================
|
||||
|
||||
Therefore, the different MPMs will be needed and a mechanism to build
|
||||
the modules spesific to them. This can now be done with the apxs2,
|
||||
apxs2-worker or apxs2-prefork script.
|
||||
|
||||
For a module's configure script, you would typically use
|
||||
--which-apxs=/usr/sbin/apxs2-prefork
|
||||
|
||||
In RPM spec files, you can use
|
||||
%define apxs apxs2
|
||||
%define apache_libexecdir %(%{apxs} -q libexecdir)
|
||||
to build modules, or use apxs2-prefork (for instance) to build a module
|
||||
specifically for the prefork MPM.
|
||||
|
||||
To further the example, apxs2-prefork will install a module below
|
||||
/usr/lib/apache2-prefork/, while "apxs2" will install it below
|
||||
/usr/lib/apache2/.
|
||||
|
||||
-a adds the module to APACHE_MODULES in /etc/sysconfig/apache2, which in turn
|
||||
takes care of loading the module.
|
||||
|
||||
Thus, usually you will only have to call
|
||||
apxs2 -cia my_module.c
|
||||
and all is fine.
|
||||
|
||||
|
||||
--
|
||||
Suggestions or bug reports (via http://bugzilla.novell.com/) are most
|
||||
welcome.
|
||||
|
||||
|
||||
Mar 14 2005, Peter Poeml
|
@ -1,4 +0,0 @@
|
||||
|
||||
This README is now online:
|
||||
http://en.opensuse.org/SDB:Apache_installation
|
||||
|
@ -1,9 +1,9 @@
|
||||
|
||||
Index: support/apachectl.in
|
||||
Index: httpd-2.4.46/support/apachectl.in
|
||||
===================================================================
|
||||
--- support/apachectl.in.orig 2012-02-01 04:47:28.000000000 +0100
|
||||
+++ support/apachectl.in 2015-07-13 17:09:06.651280087 +0200
|
||||
@@ -42,7 +42,7 @@
|
||||
--- httpd-2.4.46.orig/support/apachectl.in 2012-02-01 04:47:28.000000000 +0100
|
||||
+++ httpd-2.4.46/support/apachectl.in 2020-11-09 15:29:52.479823800 +0100
|
||||
@@ -42,7 +42,7 @@ ARGV="$@"
|
||||
# -------------------- --------------------
|
||||
#
|
||||
# the path to your httpd binary, including options if necessary
|
||||
@ -12,7 +12,7 @@ Index: support/apachectl.in
|
||||
#
|
||||
# pick up any necessary environment variables
|
||||
if test -f @exp_sbindir@/envvars; then
|
||||
@@ -52,7 +52,11 @@
|
||||
@@ -52,7 +52,11 @@ fi
|
||||
# a command that outputs a formatted text version of the HTML at the
|
||||
# url given on the command line. Designed for lynx, however other
|
||||
# programs may work.
|
@ -1,84 +0,0 @@
|
||||
/var/log/apache2/access_log {
|
||||
compress
|
||||
dateext
|
||||
maxage 365
|
||||
rotate 99
|
||||
size=+4096k
|
||||
notifempty
|
||||
missingok
|
||||
create 644 root root
|
||||
prerotate
|
||||
/etc/init.d/apache2 check-reload
|
||||
endscript
|
||||
postrotate
|
||||
/etc/init.d/apache2 reload
|
||||
endscript
|
||||
}
|
||||
|
||||
/var/log/apache2/error_log {
|
||||
compress
|
||||
dateext
|
||||
maxage 365
|
||||
rotate 99
|
||||
size=+1024k
|
||||
notifempty
|
||||
missingok
|
||||
create 644 root root
|
||||
prerotate
|
||||
/etc/init.d/apache2 check-reload
|
||||
endscript
|
||||
postrotate
|
||||
/etc/init.d/apache2 reload
|
||||
endscript
|
||||
}
|
||||
|
||||
/var/log/apache2/suexec.log {
|
||||
compress
|
||||
dateext
|
||||
maxage 365
|
||||
rotate 99
|
||||
size=+1024k
|
||||
notifempty
|
||||
missingok
|
||||
create 644 root root
|
||||
prerotate
|
||||
/etc/init.d/apache2 check-reload
|
||||
endscript
|
||||
postrotate
|
||||
/etc/init.d/apache2 reload
|
||||
endscript
|
||||
}
|
||||
|
||||
/var/log/apache2/ssl_request_log {
|
||||
compress
|
||||
dateext
|
||||
maxage 365
|
||||
rotate 99
|
||||
size=+4096k
|
||||
notifempty
|
||||
missingok
|
||||
create 644 root root
|
||||
prerotate
|
||||
/etc/init.d/apache2 check-reload
|
||||
endscript
|
||||
postrotate
|
||||
/etc/init.d/apache2 reload
|
||||
endscript
|
||||
}
|
||||
|
||||
/var/log/apache2/ssl_engine_log {
|
||||
compress
|
||||
dateext
|
||||
maxage 365
|
||||
rotate 99
|
||||
size=+1024k
|
||||
notifempty
|
||||
missingok
|
||||
create 644 root root
|
||||
prerotate
|
||||
/etc/init.d/apache2 check-reload
|
||||
endscript
|
||||
postrotate
|
||||
/etc/init.d/apache2 reload
|
||||
endscript
|
||||
}
|
@ -1,24 +1,75 @@
|
||||
LoadModule actions_module /usr/lib64/apache2-prefork/mod_actions.so
|
||||
LoadModule alias_module /usr/lib64/apache2-prefork/mod_alias.so
|
||||
LoadModule auth_basic_module /usr/lib64/apache2-prefork/mod_auth_basic.so
|
||||
LoadModule authn_file_module /usr/lib64/apache2-prefork/mod_authn_file.so
|
||||
LoadModule authz_host_module /usr/lib64/apache2-prefork/mod_authz_host.so
|
||||
LoadModule authz_groupfile_module /usr/lib64/apache2-prefork/mod_authz_groupfile.so
|
||||
LoadModule authz_user_module /usr/lib64/apache2-prefork/mod_authz_user.so
|
||||
LoadModule autoindex_module /usr/lib64/apache2-prefork/mod_autoindex.so
|
||||
LoadModule cgi_module /usr/lib64/apache2-prefork/mod_cgi.so
|
||||
LoadModule dir_module /usr/lib64/apache2-prefork/mod_dir.so
|
||||
LoadModule env_module /usr/lib64/apache2-prefork/mod_env.so
|
||||
LoadModule expires_module /usr/lib64/apache2-prefork/mod_expires.so
|
||||
LoadModule include_module /usr/lib64/apache2-prefork/mod_include.so
|
||||
LoadModule log_config_module /usr/lib64/apache2-prefork/mod_log_config.so
|
||||
LoadModule mime_module /usr/lib64/apache2-prefork/mod_mime.so
|
||||
LoadModule negotiation_module /usr/lib64/apache2-prefork/mod_negotiation.so
|
||||
LoadModule setenvif_module /usr/lib64/apache2-prefork/mod_setenvif.so
|
||||
LoadModule ssl_module /usr/lib64/apache2-prefork/mod_ssl.so
|
||||
LoadModule socache_shmcb_module /usr/lib64/apache2-prefork/mod_socache_shmcb.so
|
||||
LoadModule userdir_module /usr/lib64/apache2-prefork/mod_userdir.so
|
||||
LoadModule reqtimeout_module /usr/lib64/apache2-prefork/mod_reqtimeout.so
|
||||
LoadModule authn_core_module /usr/lib64/apache2-prefork/mod_authn_core.so
|
||||
LoadModule authz_core_module /usr/lib64/apache2-prefork/mod_authz_core.so
|
||||
|
||||
<IfModule prefork.c>
|
||||
LoadModule actions_module /usr/lib64/apache2-prefork/mod_actions.so
|
||||
LoadModule alias_module /usr/lib64/apache2-prefork/mod_alias.so
|
||||
LoadModule auth_basic_module /usr/lib64/apache2-prefork/mod_auth_basic.so
|
||||
LoadModule authn_file_module /usr/lib64/apache2-prefork/mod_authn_file.so
|
||||
LoadModule authz_host_module /usr/lib64/apache2-prefork/mod_authz_host.so
|
||||
LoadModule authz_groupfile_module /usr/lib64/apache2-prefork/mod_authz_groupfile.so
|
||||
LoadModule authz_user_module /usr/lib64/apache2-prefork/mod_authz_user.so
|
||||
LoadModule autoindex_module /usr/lib64/apache2-prefork/mod_autoindex.so
|
||||
LoadModule cgi_module /usr/lib64/apache2-prefork/mod_cgi.so
|
||||
LoadModule dir_module /usr/lib64/apache2-prefork/mod_dir.so
|
||||
LoadModule env_module /usr/lib64/apache2-prefork/mod_env.so
|
||||
LoadModule expires_module /usr/lib64/apache2-prefork/mod_expires.so
|
||||
LoadModule include_module /usr/lib64/apache2-prefork/mod_include.so
|
||||
LoadModule log_config_module /usr/lib64/apache2-prefork/mod_log_config.so
|
||||
LoadModule mime_module /usr/lib64/apache2-prefork/mod_mime.so
|
||||
LoadModule negotiation_module /usr/lib64/apache2-prefork/mod_negotiation.so
|
||||
LoadModule setenvif_module /usr/lib64/apache2-prefork/mod_setenvif.so
|
||||
LoadModule ssl_module /usr/lib64/apache2-prefork/mod_ssl.so
|
||||
LoadModule socache_shmcb_module /usr/lib64/apache2-prefork/mod_socache_shmcb.so
|
||||
LoadModule userdir_module /usr/lib64/apache2-prefork/mod_userdir.so
|
||||
LoadModule reqtimeout_module /usr/lib64/apache2-prefork/mod_reqtimeout.so
|
||||
LoadModule authn_core_module /usr/lib64/apache2-prefork/mod_authn_core.so
|
||||
LoadModule authz_core_module /usr/lib64/apache2-prefork/mod_authz_core.so
|
||||
</IfModule>
|
||||
<IfModule worker.c>
|
||||
LoadModule actions_module /usr/lib64/apache2-worker/mod_actions.so
|
||||
LoadModule alias_module /usr/lib64/apache2-worker/mod_alias.so
|
||||
LoadModule auth_basic_module /usr/lib64/apache2-worker/mod_auth_basic.so
|
||||
LoadModule authn_file_module /usr/lib64/apache2-worker/mod_authn_file.so
|
||||
LoadModule authz_host_module /usr/lib64/apache2-worker/mod_authz_host.so
|
||||
LoadModule authz_groupfile_module /usr/lib64/apache2-worker/mod_authz_groupfile.so
|
||||
LoadModule authz_user_module /usr/lib64/apache2-worker/mod_authz_user.so
|
||||
LoadModule autoindex_module /usr/lib64/apache2-worker/mod_autoindex.so
|
||||
LoadModule cgi_module /usr/lib64/apache2-worker/mod_cgi.so
|
||||
LoadModule dir_module /usr/lib64/apache2-worker/mod_dir.so
|
||||
LoadModule env_module /usr/lib64/apache2-worker/mod_env.so
|
||||
LoadModule expires_module /usr/lib64/apache2-worker/mod_expires.so
|
||||
LoadModule include_module /usr/lib64/apache2-worker/mod_include.so
|
||||
LoadModule log_config_module /usr/lib64/apache2-worker/mod_log_config.so
|
||||
LoadModule mime_module /usr/lib64/apache2-worker/mod_mime.so
|
||||
LoadModule negotiation_module /usr/lib64/apache2-worker/mod_negotiation.so
|
||||
LoadModule setenvif_module /usr/lib64/apache2-worker/mod_setenvif.so
|
||||
LoadModule ssl_module /usr/lib64/apache2-worker/mod_ssl.so
|
||||
LoadModule socache_shmcb_module /usr/lib64/apache2-worker/mod_socache_shmcb.so
|
||||
LoadModule userdir_module /usr/lib64/apache2-worker/mod_userdir.so
|
||||
LoadModule reqtimeout_module /usr/lib64/apache2-worker/mod_reqtimeout.so
|
||||
LoadModule authn_core_module /usr/lib64/apache2-worker/mod_authn_core.so
|
||||
LoadModule authz_core_module /usr/lib64/apache2-worker/mod_authz_core.so
|
||||
</IfModule>
|
||||
<IfModule event.c>
|
||||
LoadModule actions_module /usr/lib64/apache2-event/mod_actions.so
|
||||
LoadModule alias_module /usr/lib64/apache2-event/mod_alias.so
|
||||
LoadModule auth_basic_module /usr/lib64/apache2-event/mod_auth_basic.so
|
||||
LoadModule authn_file_module /usr/lib64/apache2-event/mod_authn_file.so
|
||||
LoadModule authz_host_module /usr/lib64/apache2-event/mod_authz_host.so
|
||||
LoadModule authz_groupfile_module /usr/lib64/apache2-event/mod_authz_groupfile.so
|
||||
LoadModule authz_user_module /usr/lib64/apache2-event/mod_authz_user.so
|
||||
LoadModule autoindex_module /usr/lib64/apache2-event/mod_autoindex.so
|
||||
LoadModule cgi_module /usr/lib64/apache2-event/mod_cgi.so
|
||||
LoadModule dir_module /usr/lib64/apache2-event/mod_dir.so
|
||||
LoadModule env_module /usr/lib64/apache2-event/mod_env.so
|
||||
LoadModule expires_module /usr/lib64/apache2-event/mod_expires.so
|
||||
LoadModule include_module /usr/lib64/apache2-event/mod_include.so
|
||||
LoadModule log_config_module /usr/lib64/apache2-event/mod_log_config.so
|
||||
LoadModule mime_module /usr/lib64/apache2-event/mod_mime.so
|
||||
LoadModule negotiation_module /usr/lib64/apache2-event/mod_negotiation.so
|
||||
LoadModule setenvif_module /usr/lib64/apache2-event/mod_setenvif.so
|
||||
LoadModule ssl_module /usr/lib64/apache2-event/mod_ssl.so
|
||||
LoadModule socache_shmcb_module /usr/lib64/apache2-event/mod_socache_shmcb.so
|
||||
LoadModule userdir_module /usr/lib64/apache2-event/mod_userdir.so
|
||||
LoadModule reqtimeout_module /usr/lib64/apache2-event/mod_reqtimeout.so
|
||||
LoadModule authn_core_module /usr/lib64/apache2-event/mod_authn_core.so
|
||||
LoadModule authz_core_module /usr/lib64/apache2-event/mod_authz_core.so
|
||||
</IfModule>
|
||||
|
@ -10,11 +10,12 @@ AliasMatch ^/manual(?:/(?:de|en|es|fr|ja|ko|ru))?(/.*)?$ "/usr/share/apache2/man
|
||||
Options Indexes
|
||||
AllowOverride None
|
||||
<IfModule !mod_access_compat.c>
|
||||
Require all granted
|
||||
Require local
|
||||
</IfModule>
|
||||
<IfModule mod_access_compat.c>
|
||||
Order allow,deny
|
||||
Allow from all
|
||||
Order deny,allow
|
||||
Deny from all
|
||||
Allow from localhost 127.0.0.1
|
||||
</IfModule>
|
||||
|
||||
<Files *.html>
|
||||
|
48
apache2-mod_example.c
Normal file
48
apache2-mod_example.c
Normal file
@ -0,0 +1,48 @@
|
||||
/* Include the required headers from httpd */
|
||||
#include "httpd.h"
|
||||
#include "http_core.h"
|
||||
#include "http_protocol.h"
|
||||
#include "http_request.h"
|
||||
|
||||
/* Define prototypes of our functions in this module */
|
||||
static void register_hooks(apr_pool_t *pool);
|
||||
static int example_handler(request_rec *r);
|
||||
|
||||
/* Define our module as an entity and assign a function for registering hooks */
|
||||
|
||||
module AP_MODULE_DECLARE_DATA example_module =
|
||||
{
|
||||
STANDARD20_MODULE_STUFF,
|
||||
NULL, // Per-directory configuration handler
|
||||
NULL, // Merge handler for per-directory configurations
|
||||
NULL, // Per-server configuration handler
|
||||
NULL, // Merge handler for per-server configurations
|
||||
NULL, // Any directives we may have for httpd
|
||||
register_hooks // Our hook registering function
|
||||
};
|
||||
|
||||
|
||||
/* register_hooks: Adds a hook to the httpd process */
|
||||
static void register_hooks(apr_pool_t *pool)
|
||||
{
|
||||
|
||||
/* Hook the request handler */
|
||||
ap_hook_handler(example_handler, NULL, NULL, APR_HOOK_LAST);
|
||||
}
|
||||
|
||||
/* The handler function for our module.
|
||||
* This is where all the fun happens!
|
||||
*/
|
||||
|
||||
static int example_handler(request_rec *r)
|
||||
{
|
||||
/* First off, we need to check if this is a call for the "example" handler.
|
||||
* If it is, we accept it and do our things, it not, we simply return DECLINED,
|
||||
* and Apache will try somewhere else.
|
||||
*/
|
||||
if (!r->handler || strcmp(r->handler, "example-handler")) return (DECLINED);
|
||||
|
||||
// The first thing we will do is write a simple "Hello, world!" back to the client.
|
||||
ap_rputs("Hello, world!<br/>\n", r);
|
||||
return OK;
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
Index: httpd-2.4.46/modules/proxy/mod_proxy_uwsgi.c
|
||||
===================================================================
|
||||
--- httpd-2.4.46.orig/modules/proxy/mod_proxy_uwsgi.c 2020-07-24 11:35:25.000000000 +0200
|
||||
+++ httpd-2.4.46/modules/proxy/mod_proxy_uwsgi.c 2020-08-07 14:03:05.266134827 +0200
|
||||
+++ httpd-2.4.46/modules/proxy/mod_proxy_uwsgi.c 2020-11-10 16:38:14.507125446 +0100
|
||||
@@ -175,7 +175,7 @@ static int uwsgi_send_headers(request_re
|
||||
env = (apr_table_entry_t *) env_table->elts;
|
||||
|
||||
|
@ -10,9 +10,9 @@ HTTPD_SBIN_BASE="/usr/sbin/httpd"
|
||||
function load_sysconfig
|
||||
{
|
||||
[ -n "$sysconfig_loaded" ] && return
|
||||
[ ! -f "$SYSCONFIG_FILE" ] && return
|
||||
[ ! -f "$HTTPD_SYSCONFIG_FILE" ] && return
|
||||
|
||||
. $SYSCONFIG_FILE
|
||||
. $HTTPD_SYSCONFIG_FILE
|
||||
|
||||
export ${!APACHE_*} sysconfig_loaded=true
|
||||
}
|
||||
@ -32,22 +32,10 @@ function find_mpm
|
||||
|
||||
# try to read from sysconfig's APACHE_MPM
|
||||
HTTPD_MPM="$APACHE_MPM"
|
||||
# if empty, then choose one from installed
|
||||
# if empty, then choose the one chosen by
|
||||
# update alternatives
|
||||
if [ -z "$HTTPD_MPM" ]; then
|
||||
installed_mpms=""
|
||||
for i in $HTTPD_SBIN_BASE-*; do
|
||||
test -f $i || continue
|
||||
i=$(basename $i)
|
||||
i=${i#*-}
|
||||
installed_mpms="$installed_mpms $i"
|
||||
done
|
||||
# hardcoded preference here:
|
||||
for mpm in event worker prefork; do
|
||||
if [[ $installed_mpms =~ "$mpm" ]]; then
|
||||
HTTPD_MPM=$mpm
|
||||
break
|
||||
fi
|
||||
done
|
||||
HTTPD_MPM=$(readlink $(readlink /usr/sbin/httpd) | sed "s:/usr/sbin/httpd-::")
|
||||
fi
|
||||
|
||||
# in case no
|
||||
|
@ -14,26 +14,33 @@
|
||||
. /usr/share/apache2/script-helpers
|
||||
|
||||
#
|
||||
# which instance should we will run
|
||||
# which instance should we will run, comes from
|
||||
# apache2@ service file
|
||||
#
|
||||
|
||||
unset instance_suffix
|
||||
if [ -n "$HTTPD_INSTANCE" ]; then
|
||||
instance_suffix="@$HTTPD_INSTANCE"
|
||||
if [ -n "$START_APACHE_INSTANCE" ]; then
|
||||
instance_suffix="@$START_APACHE_INSTANCE"
|
||||
fi
|
||||
|
||||
#
|
||||
# load sysconfig variables APACHE_* from instance sysconfig
|
||||
# file
|
||||
# file; START_APACHE_SYSCONFIG_FILE can be used for change the system
|
||||
# default (e. g. for testing purposes)
|
||||
#
|
||||
export SYSCONFIG_FILE=/etc/sysconfig/apache2${instance_suffix}
|
||||
export HTTPD_SYSCONFIG_FILE=${START_APACHE_SYSCONFIG_FILE:-/etc/sysconfig/apache2${instance_suffix}}
|
||||
load_sysconfig
|
||||
|
||||
#
|
||||
# dir to locate pid file into; START_APACHE_RUN_DIR can be used
|
||||
# to change the system default (e. g. for testing purposes)
|
||||
#
|
||||
run_dir="${START_APACHE_RUN_DIR:-/run}"
|
||||
|
||||
unset server_flags
|
||||
#
|
||||
# server_flags: -DSYSCONFIG
|
||||
#
|
||||
if [ -f "$SYSCONFIG_FILE" ]; then
|
||||
if [ -f "$HTTPD_SYSCONFIG_FILE" ]; then
|
||||
server_flags="$server_flags -DSYSCONFIG"
|
||||
fi
|
||||
|
||||
@ -50,9 +57,9 @@ if [ -n "$HTTPD_MPM" ]; then
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
echo >&2 "${warn}No Apache binary found. No MPM package installed? $norm"
|
||||
echo >&2 "Hint: install the apache2-prefork package, and try again."
|
||||
exit 1
|
||||
# take /usr/sbin/httpd, which will
|
||||
# exist thanks to update alternatives
|
||||
apache_bin="$HTTPD_SBIN_BASE"
|
||||
fi
|
||||
|
||||
# server flags from APACHE_SERVER_FLAGS
|
||||
@ -79,15 +86,14 @@ sysconfd_dir=$(dirname $httpd_conf)/sysconfig${instance_suffix}.d/
|
||||
# be used in the configuration to change this, otherwise
|
||||
# stopping will not work
|
||||
#
|
||||
pid_file=/run/httpd${instance_suffix}.pid
|
||||
pid_file=$run_dir/httpd${instance_suffix}.pid
|
||||
|
||||
unset sysconfig_setting
|
||||
#
|
||||
# involve the sysconfig variables
|
||||
#
|
||||
[ -d ${sysconfd_dir} ] || mkdir -p ${sysconfd_dir} || exit 1
|
||||
for c in global.conf include.conf loadmodule.conf; do
|
||||
echo "# File generated from $SYSCONFIG_FILE, do not edit. Edit the sysconfig file instead." > ${sysconfd_dir}/$c
|
||||
echo "# File generated from $HTTPD_SYSCONFIG_FILE, do not edit. Edit the sysconfig file instead." > ${sysconfd_dir}/$c
|
||||
done
|
||||
# APACHE_ACCESS_LOG -> global.conf
|
||||
if [ -n "$APACHE_ACCESS_LOG" ]; then
|
||||
@ -163,7 +169,6 @@ exec $apache_bin $server_flags \
|
||||
-C "Include $sysconfd_dir/global.conf" \
|
||||
-f $httpd_conf \
|
||||
-c "Include $sysconfd_dir/include.conf" \
|
||||
"${sysconfig_setting[@]}" \
|
||||
$@
|
||||
|
||||
exit 0
|
76
apache2-system-dirs-layout.patch
Normal file
76
apache2-system-dirs-layout.patch
Normal file
@ -0,0 +1,76 @@
|
||||
Index: httpd-2.4.46/config.layout
|
||||
===================================================================
|
||||
--- httpd-2.4.46.orig/config.layout 2020-11-11 11:02:08.957535301 +0100
|
||||
+++ httpd-2.4.46/config.layout 2020-11-11 11:03:47.118083192 +0100
|
||||
@@ -178,28 +178,52 @@
|
||||
proxycachedir: ${localstatedir}/proxy
|
||||
</Layout>
|
||||
|
||||
-# SuSE 6.x layout
|
||||
-<Layout SuSE>
|
||||
- prefix: /usr
|
||||
- exec_prefix: ${prefix}
|
||||
- bindir: ${prefix}/bin
|
||||
- sbindir: ${prefix}/sbin
|
||||
- libdir: ${prefix}/lib
|
||||
- libexecdir: ${prefix}/lib/apache
|
||||
- mandir: ${prefix}/share/man
|
||||
- sysconfdir: /etc/httpd
|
||||
- datadir: /usr/local/httpd
|
||||
- installbuilddir: ${datadir}/build
|
||||
- errordir: ${datadir}/error
|
||||
- iconsdir: ${datadir}/icons
|
||||
+# SUSE (32 bit system)
|
||||
+<Layout SUSE>
|
||||
+ prefix: /srv/www
|
||||
+ exec_prefix: /usr
|
||||
+ bindir: ${exec_prefix}/bin
|
||||
+ sbindir: ${exec_prefix}/sbin
|
||||
+ libdir: ${exec_prefix}/lib
|
||||
+ libexecdir: ${exec_prefix}/lib/apache2${MPM_SUFFIX}
|
||||
+ mandir: ${exec_prefix}/share/man
|
||||
+ sysconfdir: /etc/apache2
|
||||
+ datadir: ${prefix}
|
||||
+ installbuilddir: ${exec_prefix}/share/apache2/build
|
||||
+ errordir: ${exec_prefix}/share/apache2/error
|
||||
+ iconsdir: ${exec_prefix}/share/apache2/icons
|
||||
htdocsdir: ${datadir}/htdocs
|
||||
- manualdir: ${datadir}/manual
|
||||
+ manualdir: ${exec_prefix}/share/apache2/manual
|
||||
cgidir: ${datadir}/cgi-bin
|
||||
- includedir: ${prefix}/include/apache
|
||||
- localstatedir: /var/lib/httpd
|
||||
+ includedir: ${exec_prefix}/include/apache2${MPM_SUFFIX}
|
||||
+ localstatedir: /var/lib/apache2
|
||||
runtimedir: /var/run
|
||||
- logfiledir: /var/log/httpd
|
||||
- proxycachedir: /var/cache/httpd
|
||||
+ logfiledir: /var/log/apache2
|
||||
+ proxycachedir: /var/cache/apache2
|
||||
+</Layout>
|
||||
+
|
||||
+# SUSE (64 bit system)
|
||||
+<Layout SUSE_64>
|
||||
+ prefix: /srv/www
|
||||
+ exec_prefix: /usr
|
||||
+ bindir: ${exec_prefix}/bin
|
||||
+ sbindir: ${exec_prefix}/sbin
|
||||
+ libdir: ${exec_prefix}/lib64
|
||||
+ libexecdir: ${exec_prefix}/lib64/apache2${MPM_SUFFIX}
|
||||
+ mandir: ${exec_prefix}/share/man
|
||||
+ sysconfdir: /etc/apache2
|
||||
+ datadir: ${prefix}
|
||||
+ installbuilddir: ${exec_prefix}/share/apache2/build
|
||||
+ errordir: ${exec_prefix}/share/apache2/error
|
||||
+ iconsdir: ${exec_prefix}/share/apache2/icons
|
||||
+ htdocsdir: ${datadir}/htdocs
|
||||
+ manualdir: ${exec_prefix}/share/apache2/manual
|
||||
+ cgidir: ${datadir}/cgi-bin
|
||||
+ includedir: ${exec_prefix}/include/apache2${MPM_SUFFIX}
|
||||
+ localstatedir: /var/lib/apache2
|
||||
+ runtimedir: /var/run
|
||||
+ logfiledir: /var/log/apache2
|
||||
+ proxycachedir: /var/cache/apache2
|
||||
</Layout>
|
||||
|
||||
# BSD/OS layout
|
@ -1,3 +1,83 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Nov 26 12:10:52 UTC 2020 - pgajdos@suse.com
|
||||
|
||||
- package reworked trough [bsc#1178478]
|
||||
- modified patches
|
||||
% apache2-mod_proxy_uwsgi-fix-crash.patch (refreshed)
|
||||
- modified sources
|
||||
% apache2-loadmodule.conf
|
||||
% apache2-manual.conf
|
||||
% apache2-script-helpers
|
||||
% apache2@.service
|
||||
% sysconfig.apache2
|
||||
- deleted patches
|
||||
- deprecated-scripts-arch.patch (not needed)
|
||||
- httpd-2.0.54-envvars.dif (not needed)
|
||||
- httpd-2.1.3alpha-layout.dif
|
||||
(renamed to apache2-system-dirs-layout.patch)
|
||||
- httpd-2.2.0-apxs-a2enmod.dif (not needed)
|
||||
- httpd-2.4.9-bnc690734.patch
|
||||
(renamed to apache2-LimitRequestFieldSize-limits-headers.patch)
|
||||
- httpd-2.4.x-fate317766-config-control-two-protocol-options.diff
|
||||
(renamed to apache2-HttpContentLengthHeadZero-HttpExpectStrict.patch)
|
||||
- httpd-2.x.x-logresolve.patch
|
||||
(renamed to apache2-logresolve-tmp-security.patch)
|
||||
- httpd-apachectl.patch
|
||||
(renamed to apache2-apachectl.patch)
|
||||
- httpd-implicit-pointer-decl.patch (not needed)
|
||||
- httpd-visibility.patch (not needed)
|
||||
- deleted sources
|
||||
- SUSE-NOTICE (outdated)
|
||||
- a2enflag (renamed to apache2-a2enflag)
|
||||
- a2enmod (renamed to apache2-a2enmod)
|
||||
- apache-22-24-upgrade (outdated)
|
||||
- apache2-README (outdated)
|
||||
- apache2-README.QUICKSTART (outedated)
|
||||
- apache2-find-directives (renamed to apache2-find_directives)
|
||||
- apache2-init.logrotate (not needed)
|
||||
- apache2.firewalld (renamed to firewalld.apache2)
|
||||
- apache2.logrotate (renamed to logrotate.apache2)
|
||||
- apache2.ssl.firewalld (renamed to firewalld-ssl.apache2)
|
||||
- apache2.ssl.susefirewall (renamed to susefirewall.apache2)
|
||||
- apache2.susefirewall (renamed to susefirewall-ssl.apache2)
|
||||
- favicon.ico (not needed)
|
||||
- rc.apache2 (not needed)
|
||||
- robots.txt (not needed)
|
||||
- sysconf_addword (not needed, in aaa_base)
|
||||
- added patches
|
||||
fix PATCH: https://marc.info/?l=apache-httpd-users&m=147448312531134&w=2
|
||||
+ apache-test-application-xml-type.patch
|
||||
fix these variables from the test
|
||||
+ apache-test-turn-off-variables-in-ssl-var-lookup.patch
|
||||
fix [fate317766] backport of an upstream commit
|
||||
+ apache2-HttpContentLengthHeadZero-HttpExpectStrict.patch
|
||||
fix [bnc#690734] TODO, to be upstreamed
|
||||
+ apache2-LimitRequestFieldSize-limits-headers.patch
|
||||
fix apachectl is frontend for start_apache2, suse specific
|
||||
+ apache2-apachectl.patch
|
||||
fix [bnc#210904] perhaps to be upstreamed
|
||||
+ apache2-logresolve-tmp-security.patch
|
||||
fix layout of system dirs configuration, may be upstreamed
|
||||
+ apache2-system-dirs-layout.patch
|
||||
- added sources
|
||||
+ _multibuild
|
||||
+ apache2-a2enflag
|
||||
+ apache2-a2enmod
|
||||
+ apache2-find_directives
|
||||
+ apache2-gensslcert
|
||||
+ apache2-mod_example.c
|
||||
+ apache2-start_apache2
|
||||
+ firewalld-ssl.apache2
|
||||
+ firewalld.apache2
|
||||
+ logrotate.apache2
|
||||
+ susefirewall-ssl.apache2
|
||||
+ susefirewall.apache2
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Nov 13 12:54:04 UTC 2020 - pgajdos@suse.com
|
||||
|
||||
- apache2.spec reworked
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Oct 14 09:43:08 UTC 2020 - Franck Bui <fbui@suse.com>
|
||||
|
||||
|
2080
apache2.spec
2080
apache2.spec
File diff suppressed because it is too large
Load Diff
@ -7,7 +7,7 @@ PartOf=apache2.target
|
||||
[Service]
|
||||
Type=notify
|
||||
PrivateTmp=true
|
||||
Environment="HTTPD_INSTANCE=%i"
|
||||
Environment="START_APACHE_INSTANCE=%i"
|
||||
ExecStart=/usr/sbin/start_apache2 -DSYSTEMD -DFOREGROUND -k start
|
||||
ExecReload=/usr/sbin/start_apache2 -DSYSTEMD -DFOREGROUND -k graceful
|
||||
ExecStop=/usr/sbin/start_apache2 -DSYSTEMD -DFOREGROUND -k graceful-stop
|
||||
|
@ -1,85 +0,0 @@
|
||||
---
|
||||
deprecated-scripts/get_module_list | 56 +++++++++++++++++++------------------
|
||||
1 file changed, 30 insertions(+), 26 deletions(-)
|
||||
|
||||
Index: httpd-2.4.27/deprecated-scripts/get_module_list
|
||||
===================================================================
|
||||
--- httpd-2.4.27.orig/deprecated-scripts/get_module_list
|
||||
+++ httpd-2.4.27/deprecated-scripts/get_module_list
|
||||
@@ -4,6 +4,10 @@ pname=apache2
|
||||
: ${sysconfdir:=/etc/$pname}
|
||||
: ${sysconfig_apache:=/etc/sysconfig/$pname}
|
||||
default_APACHE_DOCUMENT_ROOT=/srv/www/htdocs
|
||||
+modpath=/usr/lib
|
||||
+if [ `/bin/arch` == "x86_64" ]; then
|
||||
+ modpath=/usr/lib64
|
||||
+fi
|
||||
|
||||
test -z "$APACHE_MODULES" && . /usr/share/$pname/load_configuration
|
||||
apache_bin=$(/usr/share/$pname/find_mpm 2>/dev/null)
|
||||
@@ -61,26 +65,26 @@ for i in ${APACHE_MODULES[*]}; do
|
||||
module_path=$i
|
||||
;;
|
||||
*)
|
||||
- for j in /usr/lib/$pname-$APACHE_MPM/mod_$i.so \
|
||||
- /usr/lib/$pname-$APACHE_MPM/$i.so \
|
||||
- /usr/lib/$pname-$APACHE_MPM/mod_$i \
|
||||
- /usr/lib/$pname-$APACHE_MPM/$i \
|
||||
- /usr/lib/$pname-$APACHE_MPM/${i/mod_}.so \
|
||||
- /usr/lib/$pname-$APACHE_MPM/${i/mod_} \
|
||||
- /usr/lib/$pname-$APACHE_MPM/lib${i/mod_}.so \
|
||||
- /usr/lib/$pname-$APACHE_MPM/lib${i/mod_} \
|
||||
- /usr/lib/$pname-$APACHE_MPM/lib$i.so \
|
||||
- /usr/lib/$pname-$APACHE_MPM/lib$i \
|
||||
- /usr/lib/$pname/mod_$i.so \
|
||||
- /usr/lib/$pname/$i.so \
|
||||
- /usr/lib/$pname/mod_$i \
|
||||
- /usr/lib/$pname/$i \
|
||||
- /usr/lib/$pname/${i/mod_}.so \
|
||||
- /usr/lib/$pname/${i/mod_} \
|
||||
- /usr/lib/$pname/lib${i/mod_}.so \
|
||||
- /usr/lib/$pname/lib${i/mod_} \
|
||||
- /usr/lib/$pname/lib$i.so \
|
||||
- /usr/lib/$pname/lib$i
|
||||
+ for j in $modpath/$pname-$APACHE_MPM/mod_$i.so \
|
||||
+ $modpath/$pname-$APACHE_MPM/$i.so \
|
||||
+ $modpath/$pname-$APACHE_MPM/mod_$i \
|
||||
+ $modpath/$pname-$APACHE_MPM/$i \
|
||||
+ $modpath/$pname-$APACHE_MPM/${i/mod_}.so \
|
||||
+ $modpath/$pname-$APACHE_MPM/${i/mod_} \
|
||||
+ $modpath/$pname-$APACHE_MPM/lib${i/mod_}.so \
|
||||
+ $modpath/$pname-$APACHE_MPM/lib${i/mod_} \
|
||||
+ $modpath/$pname-$APACHE_MPM/lib$i.so \
|
||||
+ $modpath/$pname-$APACHE_MPM/lib$i \
|
||||
+ $modpath/$pname/mod_$i.so \
|
||||
+ $modpath/$pname/$i.so \
|
||||
+ $modpath/$pname/mod_$i \
|
||||
+ $modpath/$pname/$i \
|
||||
+ $modpath/$pname/${i/mod_}.so \
|
||||
+ $modpath/$pname/${i/mod_} \
|
||||
+ $modpath/$pname/lib${i/mod_}.so \
|
||||
+ $modpath/$pname/lib${i/mod_} \
|
||||
+ $modpath/$pname/lib$i.so \
|
||||
+ $modpath/$pname/lib$i
|
||||
do
|
||||
if [ -f $j ]; then
|
||||
module_path=$j
|
||||
@@ -105,12 +109,12 @@ done
|
||||
echo >&3 -e "#\n"
|
||||
exec 3<&-
|
||||
chmod 644 $TMPFILE
|
||||
-if ! mv -Z $TMPFILE $sysconfdir/sysconfig.d/loadmodule.conf 2>/dev/null; then
|
||||
- mv $TMPFILE $sysconfdir/sysconfig.d/loadmodule.conf
|
||||
- if selinuxenabled; then
|
||||
- restorecon $sysconfdir/sysconfig.d/loadmodule.conf
|
||||
- fi
|
||||
-fi
|
||||
+if ! mv -Z $TMPFILE $sysconfdir/sysconfig.d/loadmodule.conf 2>/dev/null; then
|
||||
+ mv $TMPFILE $sysconfdir/sysconfig.d/loadmodule.conf
|
||||
+# if selinuxenabled; then
|
||||
+# restorecon $sysconfdir/sysconfig.d/loadmodule.conf
|
||||
+# fi
|
||||
+fi
|
||||
#echo -n ". "
|
||||
|
||||
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:0089226f95d2caac8a06128aaa45170aaf84c79101c2ea7a64f9422b4176766a
|
||||
size 3252
|
BIN
favicon.ico
BIN
favicon.ico
Binary file not shown.
Before Width: | Height: | Size: 302 B |
@ -1,17 +0,0 @@
|
||||
--- httpd-2.4.6.orig/support/envvars-std.in
|
||||
+++ httpd-2.4.6/support/envvars-std.in
|
||||
@@ -18,11 +18,9 @@
|
||||
#
|
||||
# This file is generated from envvars-std.in
|
||||
#
|
||||
-if test "x$@SHLIBPATH_VAR@" != "x" ; then
|
||||
- @SHLIBPATH_VAR@="@exp_libdir@:$@SHLIBPATH_VAR@"
|
||||
-else
|
||||
- @SHLIBPATH_VAR@="@exp_libdir@"
|
||||
-fi
|
||||
+
|
||||
+@SHLIBPATH_VAR@="@exp_libdir@${@SHLIBPATH_VAR@+:$@SHLIBPATH_VAR@}"
|
||||
+
|
||||
export @SHLIBPATH_VAR@
|
||||
#
|
||||
@OS_SPECIFIC_VARS@
|
@ -1,57 +0,0 @@
|
||||
--- httpd-2.4.6.orig/config.layout
|
||||
+++ httpd-2.4.6/config.layout
|
||||
@@ -178,6 +178,54 @@
|
||||
proxycachedir: /var/cache/httpd
|
||||
</Layout>
|
||||
|
||||
+# SuSE >= 8.1 layout (32 bit system)
|
||||
+<Layout SuSE81>
|
||||
+ prefix: /srv/www
|
||||
+ exec_prefix: /usr
|
||||
+ bindir: ${exec_prefix}/bin
|
||||
+ sbindir: ${exec_prefix}/sbin
|
||||
+ libdir: ${exec_prefix}/lib
|
||||
+ libexecdir: ${exec_prefix}/lib/apache2${mpm_suffix}
|
||||
+ mandir: ${exec_prefix}/share/man
|
||||
+ sysconfdir: /etc/apache2
|
||||
+ datadir: ${prefix}
|
||||
+ installbuilddir: ${exec_prefix}/share/apache2/build
|
||||
+ errordir: ${exec_prefix}/share/apache2/error
|
||||
+ iconsdir: ${exec_prefix}/share/apache2/icons
|
||||
+ htdocsdir: ${datadir}/htdocs
|
||||
+ manualdir: ${exec_prefix}/share/apache2/manual
|
||||
+ cgidir: ${datadir}/cgi-bin
|
||||
+ includedir: ${exec_prefix}/include/apache2${mpm_suffix}
|
||||
+ localstatedir: /var/lib/apache2
|
||||
+ runtimedir: /var/run
|
||||
+ logfiledir: /var/log/apache2
|
||||
+ proxycachedir: /var/cache/apache2
|
||||
+</Layout>
|
||||
+
|
||||
+# SuSE >= 8.1 layout (64 bit system)
|
||||
+<Layout SuSE81_64>
|
||||
+ prefix: /srv/www
|
||||
+ exec_prefix: /usr
|
||||
+ bindir: ${exec_prefix}/bin
|
||||
+ sbindir: ${exec_prefix}/sbin
|
||||
+ libdir: ${exec_prefix}/lib64
|
||||
+ libexecdir: ${exec_prefix}/lib64/apache2${mpm_suffix}
|
||||
+ mandir: ${exec_prefix}/share/man
|
||||
+ sysconfdir: /etc/apache2
|
||||
+ datadir: ${prefix}
|
||||
+ installbuilddir: ${exec_prefix}/share/apache2/build
|
||||
+ errordir: ${exec_prefix}/share/apache2/error
|
||||
+ iconsdir: ${exec_prefix}/share/apache2/icons
|
||||
+ htdocsdir: ${datadir}/htdocs
|
||||
+ manualdir: ${exec_prefix}/share/apache2/manual
|
||||
+ cgidir: ${datadir}/cgi-bin
|
||||
+ includedir: ${exec_prefix}/include/apache2${mpm_suffix}
|
||||
+ localstatedir: /var/lib/apache2
|
||||
+ runtimedir: /var/run
|
||||
+ logfiledir: /var/log/apache2
|
||||
+ proxycachedir: /var/cache/apache2
|
||||
+</Layout>
|
||||
+
|
||||
# BSD/OS layout
|
||||
<Layout BSDI>
|
||||
prefix: /var/www
|
@ -1,113 +0,0 @@
|
||||
--- httpd-2.4.6.orig/support/apxs.in
|
||||
+++ httpd-2.4.6/support/apxs.in
|
||||
@@ -550,108 +550,14 @@ if ($opt_i or $opt_e) {
|
||||
|
||||
# activate module via LoadModule/AddModule directive
|
||||
if ($opt_a or $opt_A) {
|
||||
- if (not -f "$CFG_SYSCONFDIR/$CFG_TARGET.conf") {
|
||||
- error("Config file $CFG_SYSCONFDIR/$CFG_TARGET.conf not found");
|
||||
- exit(1);
|
||||
- }
|
||||
-
|
||||
- open(FP, "<$CFG_SYSCONFDIR/$CFG_TARGET.conf") || die;
|
||||
- my $content = join('', <FP>);
|
||||
- close(FP);
|
||||
-
|
||||
- if ($content !~ m|\n#?\s*LoadModule\s+|) {
|
||||
- error("Activation failed for custom $CFG_SYSCONFDIR/$CFG_TARGET.conf file.");
|
||||
- error("At least one `LoadModule' directive already has to exist.");
|
||||
- exit(1);
|
||||
- }
|
||||
|
||||
my $lmd;
|
||||
my $c = '';
|
||||
$c = '#' if ($opt_A);
|
||||
foreach $lmd (@lmd) {
|
||||
- my $what = $opt_A ? "preparing" : "activating";
|
||||
- my $lmd_re = $lmd;
|
||||
- $lmd_re =~ s/\s+/\\s+/g;
|
||||
-
|
||||
- if ($content !~ m|\n#?\s*$lmd_re|) {
|
||||
- # check for open <containers>, so that the new LoadModule
|
||||
- # directive always appears *outside* of an <container>.
|
||||
-
|
||||
- my $before = ($content =~ m|^(.*\n)#?\s*LoadModule\s+[^\n]+\n|s)[0];
|
||||
-
|
||||
- # the '()=' trick forces list context and the scalar
|
||||
- # assignment counts the number of list members (aka number
|
||||
- # of matches) then
|
||||
- my $cntopen = () = ($before =~ m|^\s*<[^/].*$|mg);
|
||||
- my $cntclose = () = ($before =~ m|^\s*</.*$|mg);
|
||||
-
|
||||
- if ($cntopen == $cntclose) {
|
||||
- # fine. Last LoadModule is contextless.
|
||||
- $content =~ s|^(.*\n#?\s*LoadModule\s+[^\n]+\n)|$1$c$lmd\n|s;
|
||||
- }
|
||||
- elsif ($cntopen < $cntclose) {
|
||||
- error('Configuration file is not valid. There are sections'
|
||||
- . ' closed before opened.');
|
||||
- exit(1);
|
||||
- }
|
||||
- else {
|
||||
- # put our cmd after the section containing the last
|
||||
- # LoadModule.
|
||||
- my $found =
|
||||
- $content =~ s!\A ( # string and capture start
|
||||
- (?:(?:
|
||||
- ^\s* # start of conf line with a
|
||||
- (?:[^<]|<[^/]) # directive which does not
|
||||
- # start with '</'
|
||||
-
|
||||
- .*(?:$)\n # rest of the line.
|
||||
- # the '$' is in parentheses
|
||||
- # to avoid misinterpreting
|
||||
- # the string "$\" as
|
||||
- # perl variable.
|
||||
-
|
||||
- )* # catch as much as possible
|
||||
- # of such lines. (including
|
||||
- # zero)
|
||||
-
|
||||
- ^\s*</.*(?:$)\n? # after the above, we
|
||||
- # expect a config line with
|
||||
- # a closing container (</)
|
||||
-
|
||||
- ) {$cntopen} # the whole pattern (bunch
|
||||
- # of lines that end up with
|
||||
- # a closing directive) must
|
||||
- # be repeated $cntopen
|
||||
- # times. That's it.
|
||||
- # Simple, eh? ;-)
|
||||
-
|
||||
- ) # capture end
|
||||
- !$1$c$lmd\n!mx;
|
||||
-
|
||||
- unless ($found) {
|
||||
- error('Configuration file is not valid. There are '
|
||||
- . 'sections opened and not closed.');
|
||||
- exit(1);
|
||||
- }
|
||||
- }
|
||||
- } else {
|
||||
- # replace already existing LoadModule line
|
||||
- $content =~ s|^(.*\n)#?\s*$lmd_re[^\n]*\n|$1$c$lmd\n|s;
|
||||
- }
|
||||
- $lmd =~ m|LoadModule\s+(.+?)_module.*|;
|
||||
- notice("[$what module `$1' in $CFG_SYSCONFDIR/$CFG_TARGET.conf]");
|
||||
+ print "activating " . $name . "\n";
|
||||
+ system("a2enmod " . $name);
|
||||
}
|
||||
- if (@lmd) {
|
||||
- if (open(FP, ">$CFG_SYSCONFDIR/$CFG_TARGET.conf.new")) {
|
||||
- print FP $content;
|
||||
- close(FP);
|
||||
- system("cp $CFG_SYSCONFDIR/$CFG_TARGET.conf $CFG_SYSCONFDIR/$CFG_TARGET.conf.bak && " .
|
||||
- "cp $CFG_SYSCONFDIR/$CFG_TARGET.conf.new $CFG_SYSCONFDIR/$CFG_TARGET.conf && " .
|
||||
- "rm $CFG_SYSCONFDIR/$CFG_TARGET.conf.new");
|
||||
- } else {
|
||||
- notice("unable to open configuration file");
|
||||
- }
|
||||
- }
|
||||
}
|
||||
}
|
||||
|
3
httpd-framework-svn1878849.tar.bz2
Normal file
3
httpd-framework-svn1878849.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:b82a6b1020c286dc13616b845dcf5b60a8bb0a062613d968e271f928b997d710
|
||||
size 1591311
|
@ -1,34 +0,0 @@
|
||||
--- httpd-2.4.6.orig/server/request.c
|
||||
+++ httpd-2.4.6/server/request.c
|
||||
@@ -46,10 +46,13 @@
|
||||
#include "util_script.h"
|
||||
#include "ap_expr.h"
|
||||
#include "mod_request.h"
|
||||
-
|
||||
+#include "http_connection.h"
|
||||
#include "mod_core.h"
|
||||
#include "mod_auth.h"
|
||||
|
||||
+#include <unistd.h>
|
||||
+#include <sys/types.h>
|
||||
+
|
||||
#if APR_HAVE_STDARG_H
|
||||
#include <stdarg.h>
|
||||
#endif
|
||||
--- httpd-2.4.6.orig/server/config.c
|
||||
+++ httpd-2.4.6/server/config.c
|
||||
@@ -48,10 +48,14 @@
|
||||
#include "http_request.h" /* for default_handler (see invoke_handler) */
|
||||
#include "http_main.h"
|
||||
#include "http_vhost.h"
|
||||
+#include "http_connection.h"
|
||||
#include "util_cfgtree.h"
|
||||
#include "util_varbuf.h"
|
||||
#include "mpm_common.h"
|
||||
|
||||
+#include <unistd.h>
|
||||
+#include <sys/types.h>
|
||||
+
|
||||
#define APLOG_UNSET (APLOG_NO_MODULE - 1)
|
||||
/* we know core's module_index is 0 */
|
||||
#undef APLOG_MODULE_INDEX
|
@ -1,301 +0,0 @@
|
||||
Index: httpd-2.4.43/include/ap_config.h
|
||||
===================================================================
|
||||
--- httpd-2.4.43.orig/include/ap_config.h 2020-04-03 13:38:03.445739206 +0200
|
||||
+++ httpd-2.4.43/include/ap_config.h 2020-04-03 13:38:05.477749175 +0200
|
||||
@@ -64,7 +64,7 @@
|
||||
* AP_DECLARE(rettype) ap_func(args)
|
||||
* @endcode
|
||||
*/
|
||||
-#define AP_DECLARE(type) type
|
||||
+#define AP_DECLARE(type) __attribute__ ((visibility ("default"))) type
|
||||
|
||||
/**
|
||||
* Apache Core dso variable argument and hook functions are declared with
|
||||
@@ -74,7 +74,7 @@
|
||||
* AP_DECLARE_NONSTD(rettype) ap_func(args [...])
|
||||
* @endcode
|
||||
*/
|
||||
-#define AP_DECLARE_NONSTD(type) type
|
||||
+#define AP_DECLARE_NONSTD(type) __attribute__ ((visibility ("default"))) type
|
||||
|
||||
/**
|
||||
* Apache Core dso variables are declared with AP_MODULE_DECLARE_DATA.
|
||||
@@ -86,7 +86,7 @@
|
||||
* AP_DECLARE_DATA type apr_variable
|
||||
* @endcode
|
||||
*/
|
||||
-#define AP_DECLARE_DATA
|
||||
+#define AP_DECLARE_DATA __attribute__ ((visibility ("default")))
|
||||
|
||||
#elif defined(AP_DECLARE_STATIC)
|
||||
#define AP_DECLARE(type) type __stdcall
|
||||
@@ -115,10 +115,10 @@
|
||||
#if defined(WIN32)
|
||||
#define AP_MODULE_DECLARE(type) type __stdcall
|
||||
#else
|
||||
-#define AP_MODULE_DECLARE(type) type
|
||||
+#define AP_MODULE_DECLARE(type) __attribute__ ((visibility ("default"))) type
|
||||
#endif
|
||||
-#define AP_MODULE_DECLARE_NONSTD(type) type
|
||||
-#define AP_MODULE_DECLARE_DATA
|
||||
+#define AP_MODULE_DECLARE_NONSTD(type) __attribute__ ((visibility ("default"))) type
|
||||
+#define AP_MODULE_DECLARE_DATA __attribute__ ((visibility ("default")))
|
||||
#else
|
||||
/**
|
||||
* AP_MODULE_DECLARE_EXPORT is a no-op. Unless contradicted by the
|
||||
Index: httpd-2.4.43/modules/cache/mod_cache.h
|
||||
===================================================================
|
||||
--- httpd-2.4.43.orig/modules/cache/mod_cache.h 2020-04-03 13:38:03.445739206 +0200
|
||||
+++ httpd-2.4.43/modules/cache/mod_cache.h 2020-04-03 13:38:05.545749508 +0200
|
||||
@@ -37,9 +37,9 @@
|
||||
* CACHE_DECLARE_DATA with appropriate export and import tags for the platform
|
||||
*/
|
||||
#if !defined(WIN32)
|
||||
-#define CACHE_DECLARE(type) type
|
||||
-#define CACHE_DECLARE_NONSTD(type) type
|
||||
-#define CACHE_DECLARE_DATA
|
||||
+#define CACHE_DECLARE(type) __attribute__ ((visibility ("default"))) type
|
||||
+#define CACHE_DECLARE_NONSTD(type) __attribute__ ((visibility ("default"))) type
|
||||
+#define CACHE_DECLARE_DATA __attribute__ ((visibility ("default")))
|
||||
#elif defined(CACHE_DECLARE_STATIC)
|
||||
#define CACHE_DECLARE(type) type __stdcall
|
||||
#define CACHE_DECLARE_NONSTD(type) type
|
||||
Index: httpd-2.4.43/modules/proxy/mod_proxy.h
|
||||
===================================================================
|
||||
--- httpd-2.4.43.orig/modules/proxy/mod_proxy.h 2020-04-03 13:38:03.445739206 +0200
|
||||
+++ httpd-2.4.43/modules/proxy/mod_proxy.h 2020-04-03 13:38:05.545749508 +0200
|
||||
@@ -573,9 +573,9 @@ struct proxy_balancer_method {
|
||||
* PROXY_DECLARE_DATA with appropriate export and import tags for the platform
|
||||
*/
|
||||
#if !defined(WIN32)
|
||||
-#define PROXY_DECLARE(type) type
|
||||
-#define PROXY_DECLARE_NONSTD(type) type
|
||||
-#define PROXY_DECLARE_DATA
|
||||
+#define PROXY_DECLARE(type) __attribute__ ((visibility ("default"))) type
|
||||
+#define PROXY_DECLARE_NONSTD(type) __attribute__ ((visibility ("default"))) type
|
||||
+#define PROXY_DECLARE_DATA __attribute__ ((visibility ("default")))
|
||||
#elif defined(PROXY_DECLARE_STATIC)
|
||||
#define PROXY_DECLARE(type) type __stdcall
|
||||
#define PROXY_DECLARE_NONSTD(type) type
|
||||
Index: httpd-2.4.43/modules/lua/mod_lua.h
|
||||
===================================================================
|
||||
--- httpd-2.4.43.orig/modules/lua/mod_lua.h 2020-04-03 13:38:03.445739206 +0200
|
||||
+++ httpd-2.4.43/modules/lua/mod_lua.h 2020-04-03 13:38:05.545749508 +0200
|
||||
@@ -62,9 +62,9 @@
|
||||
* AP_LUA_DECLARE_DATA with appropriate export and import tags for the platform
|
||||
*/
|
||||
#if !defined(WIN32)
|
||||
-#define AP_LUA_DECLARE(type) type
|
||||
-#define AP_LUA_DECLARE_NONSTD(type) type
|
||||
-#define AP_LUA_DECLARE_DATA
|
||||
+#define AP_LUA_DECLARE(type) __attribute__ ((visibility ("default"))) type
|
||||
+#define AP_LUA_DECLARE_NONSTD(type) __attribute__ ((visibility ("default"))) type
|
||||
+#define AP_LUA_DECLARE_DATA __attribute__ ((visibility ("default")))
|
||||
#elif defined(AP_LUA_DECLARE_STATIC)
|
||||
#define AP_LUA_DECLARE(type) type __stdcall
|
||||
#define AP_LUA_DECLARE_NONSTD(type) type
|
||||
Index: httpd-2.4.43/modules/core/mod_watchdog.h
|
||||
===================================================================
|
||||
--- httpd-2.4.43.orig/modules/core/mod_watchdog.h 2020-04-03 13:38:03.445739206 +0200
|
||||
+++ httpd-2.4.43/modules/core/mod_watchdog.h 2020-04-03 13:38:05.545749508 +0200
|
||||
@@ -83,9 +83,9 @@ typedef struct ap_watchdog_t ap_watchdog
|
||||
*/
|
||||
#if !defined(AP_WD_DECLARE)
|
||||
#if !defined(WIN32)
|
||||
-#define AP_WD_DECLARE(type) type
|
||||
-#define AP_WD_DECLARE_NONSTD(type) type
|
||||
-#define AP_WD_DECLARE_DATA
|
||||
+#define AP_WD_DECLARE(type) __attribute__ ((visibility ("default"))) type
|
||||
+#define AP_WD_DECLARE_NONSTD(type) __attribute__ ((visibility ("default"))) type
|
||||
+#define AP_WD_DECLARE_DATA __attribute__ ((visibility ("default")))
|
||||
#elif defined(AP_WD_DECLARE_STATIC)
|
||||
#define AP_WD_DECLARE(type) type __stdcall
|
||||
#define AP_WD_DECLARE_NONSTD(type) type
|
||||
Index: httpd-2.4.43/modules/generators/mod_status.h
|
||||
===================================================================
|
||||
--- httpd-2.4.43.orig/modules/generators/mod_status.h 2020-04-03 13:38:03.445739206 +0200
|
||||
+++ httpd-2.4.43/modules/generators/mod_status.h 2020-04-03 13:38:05.545749508 +0200
|
||||
@@ -34,9 +34,9 @@
|
||||
#define AP_STATUS_EXTENDED (0x4) /* detailed report */
|
||||
|
||||
#if !defined(WIN32)
|
||||
-#define STATUS_DECLARE(type) type
|
||||
-#define STATUS_DECLARE_NONSTD(type) type
|
||||
-#define STATUS_DECLARE_DATA
|
||||
+#define STATUS_DECLARE(type) __attribute__ ((visibility ("default"))) type
|
||||
+#define STATUS_DECLARE_NONSTD(type) __attribute__ ((visibility ("default"))) type
|
||||
+#define STATUS_DECLARE_DATA __attribute__ ((visibility ("default")))
|
||||
#elif defined(STATUS_DECLARE_STATIC)
|
||||
#define STATUS_DECLARE(type) type __stdcall
|
||||
#define STATUS_DECLARE_NONSTD(type) type
|
||||
Index: httpd-2.4.43/modules/dav/main/mod_dav.h
|
||||
===================================================================
|
||||
--- httpd-2.4.43.orig/modules/dav/main/mod_dav.h 2020-04-03 13:38:03.445739206 +0200
|
||||
+++ httpd-2.4.43/modules/dav/main/mod_dav.h 2020-04-03 13:38:05.549749528 +0200
|
||||
@@ -82,9 +82,9 @@ extern "C" {
|
||||
* DAV_DECLARE_DATA with appropriate export and import tags for the platform
|
||||
*/
|
||||
#if !defined(WIN32)
|
||||
-#define DAV_DECLARE(type) type
|
||||
-#define DAV_DECLARE_NONSTD(type) type
|
||||
-#define DAV_DECLARE_DATA
|
||||
+#define DAV_DECLARE(type) __attribute__ ((visibility ("default"))) type
|
||||
+#define DAV_DECLARE_NONSTD(type) __attribute__ ((visibility ("default"))) type
|
||||
+#define DAV_DECLARE_DATA __attribute__ ((visibility ("default")))
|
||||
#elif defined(DAV_DECLARE_STATIC)
|
||||
#define DAV_DECLARE(type) type __stdcall
|
||||
#define DAV_DECLARE_NONSTD(type) type
|
||||
Index: httpd-2.4.43/modules/session/mod_session.h
|
||||
===================================================================
|
||||
--- httpd-2.4.43.orig/modules/session/mod_session.h 2020-04-03 13:38:03.445739206 +0200
|
||||
+++ httpd-2.4.43/modules/session/mod_session.h 2020-04-03 13:38:05.549749528 +0200
|
||||
@@ -21,9 +21,9 @@
|
||||
* SESSION_DECLARE_DATA with appropriate export and import tags for the platform
|
||||
*/
|
||||
#if !defined(WIN32)
|
||||
-#define SESSION_DECLARE(type) type
|
||||
-#define SESSION_DECLARE_NONSTD(type) type
|
||||
-#define SESSION_DECLARE_DATA
|
||||
+#define SESSION_DECLARE(type) __attribute__ ((visibility ("default"))) type
|
||||
+#define SESSION_DECLARE_NONSTD(type) __attribute__ ((visibility ("default"))) type
|
||||
+#define SESSION_DECLARE_DATA __attribute__ ((visibility ("default")))
|
||||
#elif defined(SESSION_DECLARE_STATIC)
|
||||
#define SESSION_DECLARE(type) type __stdcall
|
||||
#define SESSION_DECLARE_NONSTD(type) type
|
||||
Index: httpd-2.4.43/modules/database/mod_dbd.h
|
||||
===================================================================
|
||||
--- httpd-2.4.43.orig/modules/database/mod_dbd.h 2020-04-03 13:38:03.445739206 +0200
|
||||
+++ httpd-2.4.43/modules/database/mod_dbd.h 2020-04-03 13:38:05.549749528 +0200
|
||||
@@ -35,9 +35,9 @@
|
||||
* DBD_DECLARE_DATA with appropriate export and import tags for the platform
|
||||
*/
|
||||
#if !defined(WIN32)
|
||||
-#define DBD_DECLARE(type) type
|
||||
-#define DBD_DECLARE_NONSTD(type) type
|
||||
-#define DBD_DECLARE_DATA
|
||||
+#define DBD_DECLARE(type) __attribute__ ((visibility ("default"))) type
|
||||
+#define DBD_DECLARE_NONSTD(type) __attribute__ ((visibility ("default"))) type
|
||||
+#define DBD_DECLARE_DATA __attribute__ ((visibility ("default")))
|
||||
#elif defined(DBD_DECLARE_STATIC)
|
||||
#define DBD_DECLARE(type) type __stdcall
|
||||
#define DBD_DECLARE_NONSTD(type) type
|
||||
Index: httpd-2.4.43/modules/filters/mod_xml2enc.h
|
||||
===================================================================
|
||||
--- httpd-2.4.43.orig/modules/filters/mod_xml2enc.h 2020-04-03 13:38:03.445739206 +0200
|
||||
+++ httpd-2.4.43/modules/filters/mod_xml2enc.h 2020-04-03 13:38:05.549749528 +0200
|
||||
@@ -25,9 +25,9 @@
|
||||
|
||||
/* declarations to deal with WIN32 compile-flag-in-source-code crap */
|
||||
#if !defined(WIN32)
|
||||
-#define XML2ENC_DECLARE(type) type
|
||||
-#define XML2ENC_DECLARE_NONSTD(type) type
|
||||
-#define XML2ENC_DECLARE_DATA
|
||||
+#define XML2ENC_DECLARE(type) __attribute__ ((visibility ("default"))) type
|
||||
+#define XML2ENC_DECLARE_NONSTD(type) __attribute__ ((visibility ("default"))) type
|
||||
+#define XML2ENC_DECLARE_DATA __attribute__ ((visibility ("default")))
|
||||
#elif defined(XML2ENC_DECLARE_STATIC)
|
||||
#define XML2ENC_DECLARE(type) type __stdcall
|
||||
#define XML2ENC_DECLARE_NONSTD(type) type
|
||||
Index: httpd-2.4.43/modules/filters/mod_ratelimit.h
|
||||
===================================================================
|
||||
--- httpd-2.4.43.orig/modules/filters/mod_ratelimit.h 2020-04-03 13:38:03.445739206 +0200
|
||||
+++ httpd-2.4.43/modules/filters/mod_ratelimit.h 2020-04-03 13:38:05.549749528 +0200
|
||||
@@ -21,9 +21,9 @@
|
||||
* AP_RL_DECLARE_DATA with appropriate export and import tags for the platform
|
||||
*/
|
||||
#if !defined(WIN32)
|
||||
-#define AP_RL_DECLARE(type) type
|
||||
-#define AP_RL_DECLARE_NONSTD(type) type
|
||||
-#define AP_RL_DECLARE_DATA
|
||||
+#define AP_RL_DECLARE(type) __attribute__ ((visibility ("default"))) type
|
||||
+#define AP_RL_DECLARE_NONSTD(type) __attribute__ ((visibility ("default"))) type
|
||||
+#define AP_RL_DECLARE_DATA __attribute__ ((visibility ("default")))
|
||||
#elif defined(AP_RL_DECLARE_STATIC)
|
||||
#define AP_RL_DECLARE(type) type __stdcall
|
||||
#define AP_RL_DECLARE_NONSTD(type) type
|
||||
Index: httpd-2.4.43/modules/aaa/mod_authz_dbd.h
|
||||
===================================================================
|
||||
--- httpd-2.4.43.orig/modules/aaa/mod_authz_dbd.h 2020-04-03 13:38:03.445739206 +0200
|
||||
+++ httpd-2.4.43/modules/aaa/mod_authz_dbd.h 2020-04-03 13:38:05.549749528 +0200
|
||||
@@ -22,9 +22,9 @@
|
||||
* AUTHZ_DBD_DECLARE_DATA with appropriate export and import tags
|
||||
*/
|
||||
#if !defined(WIN32)
|
||||
-#define AUTHZ_DBD_DECLARE(type) type
|
||||
-#define AUTHZ_DBD_DECLARE_NONSTD(type) type
|
||||
-#define AUTHZ_DBD_DECLARE_DATA
|
||||
+#define AUTHZ_DBD_DECLARE(type) __attribute__ ((visibility ("default"))) type
|
||||
+#define AUTHZ_DBD_DECLARE_NONSTD(type) __attribute__ ((visibility ("default"))) type
|
||||
+#define AUTHZ_DBD_DECLARE_DATA __attribute__ ((visibility ("default")))
|
||||
#elif defined(AUTHZ_DBD_DECLARE_STATIC)
|
||||
#define AUTHZ_DBD_DECLARE(type) type __stdcall
|
||||
#define AUTHZ_DBD_DECLARE_NONSTD(type) type
|
||||
Index: httpd-2.4.43/include/httpd.h
|
||||
===================================================================
|
||||
--- httpd-2.4.43.orig/include/httpd.h 2020-04-03 13:38:03.445739206 +0200
|
||||
+++ httpd-2.4.43/include/httpd.h 2020-04-03 13:38:05.549749528 +0200
|
||||
@@ -345,7 +345,7 @@ extern "C" {
|
||||
* by modules. Its purpose is to allow us to add attributes that
|
||||
* particular platforms or compilers require to every exported function.
|
||||
*/
|
||||
-# define AP_DECLARE(type) type
|
||||
+# define AP_DECLARE(type) __attribute__ ((visibility ("default"))) type
|
||||
#endif
|
||||
|
||||
#ifndef AP_DECLARE_NONSTD
|
||||
@@ -356,20 +356,20 @@ extern "C" {
|
||||
* which use varargs or are used via indirect function call. This
|
||||
* is to accommodate the two calling conventions in windows dlls.
|
||||
*/
|
||||
-# define AP_DECLARE_NONSTD(type) type
|
||||
+# define AP_DECLARE_NONSTD(type) __attribute__ ((visibility ("default"))) type
|
||||
#endif
|
||||
#ifndef AP_DECLARE_DATA
|
||||
-# define AP_DECLARE_DATA
|
||||
+# define AP_DECLARE_DATA __attribute__ ((visibility ("default")))
|
||||
#endif
|
||||
|
||||
#ifndef AP_MODULE_DECLARE
|
||||
-# define AP_MODULE_DECLARE(type) type
|
||||
+# define AP_MODULE_DECLARE(type) __attribute__ ((visibility ("default"))) type
|
||||
#endif
|
||||
#ifndef AP_MODULE_DECLARE_NONSTD
|
||||
-# define AP_MODULE_DECLARE_NONSTD(type) type
|
||||
+# define AP_MODULE_DECLARE_NONSTD(type) __attribute__ ((visibility ("default"))) type
|
||||
#endif
|
||||
#ifndef AP_MODULE_DECLARE_DATA
|
||||
-# define AP_MODULE_DECLARE_DATA
|
||||
+# define AP_MODULE_DECLARE_DATA __attribute__ ((visibility ("default")))
|
||||
#endif
|
||||
|
||||
/**
|
||||
Index: httpd-2.4.43/include/util_ldap.h
|
||||
===================================================================
|
||||
--- httpd-2.4.43.orig/include/util_ldap.h 2020-04-03 13:38:03.445739206 +0200
|
||||
+++ httpd-2.4.43/include/util_ldap.h 2020-04-03 13:38:05.549749528 +0200
|
||||
@@ -66,9 +66,9 @@
|
||||
* and import tags for the platform
|
||||
*/
|
||||
#if !defined(WIN32)
|
||||
-#define LDAP_DECLARE(type) type
|
||||
-#define LDAP_DECLARE_NONSTD(type) type
|
||||
-#define LDAP_DECLARE_DATA
|
||||
+#define LDAP_DECLARE(type) __attribute__ ((visibility ("default"))) type
|
||||
+#define LDAP_DECLARE_NONSTD(type) __attribute__ ((visibility ("default"))) type
|
||||
+#define LDAP_DECLARE_DATA __attribute__ ((visibility ("default")))
|
||||
#elif defined(LDAP_DECLARE_STATIC)
|
||||
#define LDAP_DECLARE(type) type __stdcall
|
||||
#define LDAP_DECLARE_NONSTD(type) type
|
||||
Index: httpd-2.4.43/include/mpm_common.h
|
||||
===================================================================
|
||||
--- httpd-2.4.43.orig/include/mpm_common.h 2018-08-14 22:56:54.000000000 +0200
|
||||
+++ httpd-2.4.43/include/mpm_common.h 2020-04-03 13:40:10.698363488 +0200
|
||||
@@ -195,7 +195,7 @@ AP_DECLARE(void) ap_wait_or_timeout(apr_
|
||||
* Nagle's algorithm that have severe performance penalties.
|
||||
* @param s The socket to disable nagle for.
|
||||
*/
|
||||
-void ap_sock_disable_nagle(apr_socket_t *s);
|
||||
+AP_DECLARE(void) ap_sock_disable_nagle(apr_socket_t *s);
|
||||
#else
|
||||
#define ap_sock_disable_nagle(s) /* NOOP */
|
||||
#endif
|
404
rc.apache2
404
rc.apache2
@ -1,404 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Copyright (c) 1996, 1997, 1998 S.u.S.E. GmbH
|
||||
# Copyright (c) 1998, 1999, 2000, 2001 SuSE GmbH
|
||||
# Copyright (c) 2002, 2003, (2004?) SuSE Linux AG
|
||||
# Copyright (c) 2004(?), 2005, 2006, 2007, 2008 SUSE Linux Products GmbH
|
||||
#
|
||||
# Authors: Rolf Haberrecker <apache@suse.de>, 2001
|
||||
# Peter Poeml <apache@suse.de>, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011.
|
||||
# Roman Drahtmueller <draht@suse.de>, 2010, 2011, 2012.
|
||||
#
|
||||
#
|
||||
# /etc/init.d/apache2
|
||||
#
|
||||
### BEGIN INIT INFO
|
||||
# Provides: apache apache2 httpd
|
||||
# Required-Start: $local_fs $remote_fs $network
|
||||
# Should-Start: $named $time postgresql sendmail mysql ypclient dhcp radiusd
|
||||
# Should-Stop: $named $time postgresql sendmail mysql ypclient dhcp radiusd
|
||||
# Required-Stop: $local_fs $remote_fs $network
|
||||
# Default-Start: 3 5
|
||||
# Default-Stop: 0 1 2 6
|
||||
# X-Interactive: true
|
||||
# Short-Description: Apache 2 HTTP Server
|
||||
# Description: Start the Apache HTTP daemon
|
||||
### END INIT INFO
|
||||
|
||||
pname=apache2
|
||||
: ${sysconfdir:=/etc/$pname}
|
||||
: ${apache_link:=/usr/sbin/httpd}
|
||||
: ${sysconfig_apache:=/etc/sysconfig/$pname}
|
||||
: ${pidfile:=/var/run/httpd.pid}
|
||||
: ${logdir:=/var/log/$pname}
|
||||
: ${homedir:=/var/lib/$pname}
|
||||
|
||||
#
|
||||
# load the configuration
|
||||
#
|
||||
|
||||
#
|
||||
# Note about ulimits:
|
||||
# if you want to set ulimits, e.g. to increase the max number of open file handle,
|
||||
# or to allow core files, you can do so by editing /etc/sysconfig/apache2 and
|
||||
# simply write the ulimit commands into that file.
|
||||
# Example:
|
||||
# ulimit -n 16384
|
||||
# ulimit -H -n 16384
|
||||
# ulimit -c unlimited
|
||||
# See the output of "help ulimit" in the bash, or "man 1 ulimit".
|
||||
#
|
||||
test -s /etc/rc.status && . /etc/rc.status && rc_reset
|
||||
|
||||
. /usr/share/$pname/load_configuration
|
||||
export ${!APACHE_*}
|
||||
|
||||
httpd_conf=${APACHE_HTTPD_CONF:-$sysconfdir/httpd.conf}
|
||||
|
||||
apache_bin=$(/usr/share/$pname/find_mpm 2>/dev/null)
|
||||
|
||||
test -L $apache_link && apache_bin=$(readlink $apache_link)
|
||||
|
||||
if [ -z "$APACHE_MPM" ]; then
|
||||
APACHE_MPM=${apache_bin##*-}
|
||||
fi
|
||||
|
||||
if ! [ -x $apache_bin ]; then
|
||||
echo >&2 ${warn}$apache_bin-$APACHE_MPM is not a valid httpd binary.
|
||||
echo >&2 Check your APACHE_MPM setting in /etc/sysconfig/$pname. $norm
|
||||
rc_failed 5
|
||||
rc_status -v1
|
||||
rc_exit
|
||||
fi
|
||||
|
||||
# a proper home should be set, otherwise the server might end up
|
||||
# with HOME=/root and some script might try to use that
|
||||
HOME=$homedir
|
||||
|
||||
get_server_flags()
|
||||
{
|
||||
unset server_flags
|
||||
case "$action" in startssl) server_flags="-DSSL";; esac
|
||||
for i in $APACHE_SERVER_FLAGS; do
|
||||
case $i in
|
||||
-D) ;;
|
||||
-D*) server_flags="$server_flags $i";;
|
||||
*) server_flags="$server_flags -D$i";;
|
||||
esac
|
||||
done
|
||||
server_flags="$server_flags -DSYSCONFIG -C 'Include /etc/apache2/sysconfig.d/'"
|
||||
}
|
||||
|
||||
action="$1"
|
||||
case "$action" in
|
||||
stop|try-restart|*status*|probe)
|
||||
;;
|
||||
*)
|
||||
shift; get_server_flags
|
||||
${get_module_list_done:=false} || /usr/share/$pname/get_module_list && export get_module_list_done=true
|
||||
${get_includes:=false} || /usr/share/$pname/get_includes && export get_includes_done=true
|
||||
;;
|
||||
esac
|
||||
|
||||
#
|
||||
# main part
|
||||
#
|
||||
case "$action" in
|
||||
start*)
|
||||
if [ -e $pidfile ]; then
|
||||
$0 status &>/dev/null
|
||||
ret=$?
|
||||
if [ $ret = 1 ]; then
|
||||
echo "Warning: found stale pidfile (unclean shutdown?)"
|
||||
elif [ $ret = 0 ]; then
|
||||
echo "Apache is already running ($pidfile)"
|
||||
rc_failed $ret
|
||||
rc_status -v1
|
||||
rc_exit
|
||||
fi
|
||||
fi
|
||||
|
||||
echo -n "Starting httpd (${APACHE_MPM:-${apache_bin#*-}}) "
|
||||
cmdline=$(echo $apache_bin -f $httpd_conf $server_flags "$@")
|
||||
if eval $cmdline -t > $logdir/rc$pname.out 2>&1 ; then
|
||||
export -n ${!APACHE_*}
|
||||
eval startproc -f -t ${APACHE_START_TIMEOUT:-2} $cmdline
|
||||
ret=$?
|
||||
|
||||
if test -t 1 && stty -a 2>/dev/null | grep -q -- -echo\ ; then
|
||||
# this means that apache was still waiting for a passphrase to be entered
|
||||
stty echo 2>/dev/null
|
||||
echo;echo
|
||||
echo >&2 An SSL passphrase has not been entered within ${APACHE_START_TIMEOUT:-<not set>} seconds.
|
||||
echo >&2 To increase this timeout, adjust APACHE_START_TIMEOUT in $sysconfig_apache .
|
||||
# this surely means that apache won't start, despite it looked good to startproc
|
||||
killall $apache_bin
|
||||
echo >&2 "Trying to start the server without SSL (-D NOSSL)."
|
||||
$0 start "$@" -D NOSSL
|
||||
# rc_failed 1
|
||||
# rc_status -v1
|
||||
# rc_exit
|
||||
else
|
||||
rc_failed $ret
|
||||
rc_status -v
|
||||
fi
|
||||
else
|
||||
if [ "$link" = "$base" ] ; then
|
||||
cat $logdir/rc$pname.out
|
||||
echo >&2
|
||||
echo >&2 The command line was:
|
||||
echo >&2 $cmdline
|
||||
echo >&2
|
||||
else
|
||||
echo -e -n "\nsee $logdir/rc$pname.out for details\n";
|
||||
fi
|
||||
rc_failed 1
|
||||
rc_status -v1
|
||||
fi
|
||||
;;
|
||||
stop)
|
||||
echo -n "Shutting down httpd "
|
||||
if [ ! -f $pidfile -a -f $pidfile.rpmsave ]; then mv $pidfile.rpmsave $pidfile; fi
|
||||
if ! [ -f $pidfile ]; then
|
||||
echo -n "(not running)"
|
||||
else
|
||||
pid=$(<$pidfile)
|
||||
# re-read exe symlink, it could be (deleted) in the meanwhile.
|
||||
apache_bin=$(readlink /proc/$pid/exe 2>/dev/null)
|
||||
kill -TERM $pid 2>/dev/null
|
||||
case $? in
|
||||
1) echo -n "(not running)";;
|
||||
0) # wait until the processes are gone (the parent is the last one)
|
||||
echo -n "(waiting for all children to terminate) "
|
||||
for ((wait=0; wait<120; wait++)); do
|
||||
if test -f $pidfile; then
|
||||
usleep 500000
|
||||
continue
|
||||
fi
|
||||
if ! test -f /proc/$pid/exe; then
|
||||
break
|
||||
fi
|
||||
if test "$(readlink /proc/$pid/exe 2>/dev/null)" = "$apache_bin"; then
|
||||
usleep 500000
|
||||
else
|
||||
break
|
||||
fi
|
||||
|
||||
done
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
rc_status -v
|
||||
;;
|
||||
stop-graceful)
|
||||
echo "Shutting down httpd gracefully (SIGWINCH)"
|
||||
if ! [ -f $pidfile ]; then
|
||||
echo -n "(not running)"
|
||||
else
|
||||
pid=$(<$pidfile)
|
||||
kill -WINCH $pid 2>/dev/null
|
||||
case $? in
|
||||
1) echo -n "(not running)";;
|
||||
0) # wait until the pidfile is gone. The parent stays there, but closes the listen ports.
|
||||
echo -n "(waiting for parent to close listen ports and remove pidfile) "
|
||||
for ((wait=0; wait<120; wait++)); do
|
||||
if test -f $pidfile; then
|
||||
usleep 500000
|
||||
continue
|
||||
else
|
||||
break
|
||||
fi
|
||||
done
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
rc_status -v
|
||||
;;
|
||||
try-restart)
|
||||
## Do a restart only if the service was active before.
|
||||
## Note: try-restart is now part of LSB (as of 1.9).
|
||||
## RH has a similar command named condrestart.
|
||||
$0 status
|
||||
if test $? = 0; then
|
||||
$0 restart
|
||||
else
|
||||
rc_reset # Not running is not a failure.
|
||||
fi
|
||||
# Remember status and be quiet
|
||||
rc_status
|
||||
;;
|
||||
restart)
|
||||
$0 configtest "$@" || { rc_failed $?; rc_exit; }
|
||||
|
||||
if $0 status &>/dev/null; then
|
||||
$0 stop
|
||||
fi
|
||||
$0 start "$@"
|
||||
# Remember status and be quiet
|
||||
rc_status
|
||||
;;
|
||||
restart-hup)
|
||||
$0 configtest "$@" || { rc_failed $?; rc_exit; }
|
||||
|
||||
if $0 status &>/dev/null; then
|
||||
echo -n "Restarting httpd (SIGHUP)"
|
||||
kill -HUP $(<$pidfile) || return=$rc_failed
|
||||
else
|
||||
$0 start "$@"
|
||||
fi
|
||||
# Remember status and be quiet
|
||||
rc_status -v
|
||||
;;
|
||||
restart-graceful)
|
||||
$0 configtest "$@" || { rc_failed $?; rc_exit; }
|
||||
|
||||
if $0 status &>/dev/null; then
|
||||
$0 stop-graceful "$@"
|
||||
$0 start "$@"
|
||||
else
|
||||
$0 start "$@"
|
||||
fi
|
||||
# Remember status and be quiet
|
||||
rc_status
|
||||
;;
|
||||
reload|force-reload|graceful)
|
||||
# check if there is a deleted binary. If there is, then logrotate
|
||||
# or other occasions will fail to reload, as dlopen(3) of apache
|
||||
# modules is prone to fail due to symbol mismatches.
|
||||
# in this case, we only complain and fail.
|
||||
if [ ! -f $pidfile -a -f $pidfile.rpmsave ]; then mv $pidfile.rpmsave $pidfile; fi
|
||||
executable=$( readlink /proc/$(cat $pidfile)/exe 2> /dev/null )
|
||||
case "$executable" in
|
||||
*httpd*delete*)
|
||||
echo -n "Reload httpd after package update: ignoring request. Please do a manual restart explicitly! "
|
||||
rc_failed 1
|
||||
rc_status -v
|
||||
rc_exit
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
|
||||
echo -n "Reload httpd (graceful restart)"
|
||||
|
||||
cmdline=$(echo $apache_bin -f $httpd_conf $server_flags "$@")
|
||||
if eval $cmdline -t &> $logdir/rc$pname.out; then
|
||||
killproc -USR1 $apache_bin || return=$rc_failed
|
||||
rc_status -v
|
||||
else
|
||||
if [ "$link" = "$base" ] ; then
|
||||
echo -e -n "\n\n"
|
||||
cat $logdir/rc$pname.out
|
||||
echo >&2
|
||||
echo >&2 The command line was:
|
||||
echo >&2 $cmdline
|
||||
echo >&2
|
||||
else
|
||||
echo -e -n "\nsee $logdir/rc$pname.out for details\n";
|
||||
fi
|
||||
rc_failed 6
|
||||
rc_status -v1
|
||||
fi
|
||||
;;
|
||||
status)
|
||||
if [ ! -f $pidfile -a -f $pidfile.rpmsave ]; then mv $pidfile.rpmsave $pidfile; fi
|
||||
echo -n "Checking for httpd: "
|
||||
# we don't use checkproc here since it is confused when we exchange the binaries
|
||||
if ! [ -f $pidfile ]; then
|
||||
# not running
|
||||
rc_failed 3
|
||||
elif [ -s $pidfile -a -d /proc/$(<$pidfile) ]; then
|
||||
# running
|
||||
:
|
||||
else
|
||||
# stale pid file
|
||||
rc_failed 1
|
||||
#rm -f $pidfile
|
||||
fi
|
||||
rc_status -v
|
||||
;;
|
||||
probe)
|
||||
## Optional: Probe for the necessity of a reload,
|
||||
## give out the argument which is required for a reload.
|
||||
|
||||
for i in $httpd_conf \
|
||||
$APACHE_CONF_INCLUDE_FILES \
|
||||
$APACHE_CONF_INCLUDE_DIRS
|
||||
do
|
||||
if [ $i -nt $pidfile ]; then
|
||||
echo reload
|
||||
break
|
||||
fi
|
||||
done
|
||||
;;
|
||||
|
||||
conf*|test|syntax|check)
|
||||
cmdline=$(echo $apache_bin -f $httpd_conf $server_flags "$@")
|
||||
eval $cmdline -t
|
||||
rc_failed $?
|
||||
rc_exit
|
||||
;;
|
||||
|
||||
extr*)
|
||||
cmdline=$(echo $apache_bin -f $httpd_conf $server_flags "$@")
|
||||
out=$(su - nobody -c "$cmdline" 2>&1)
|
||||
case $out in
|
||||
*make_sock:\ could\ not\ bind\ to\ address*) echo Syntax: OK; rc_failed=0;;
|
||||
*) echo Syntax: NOT OK:; echo $out; rc_failed=1;;
|
||||
esac
|
||||
rc_exit
|
||||
;;
|
||||
|
||||
server-status)
|
||||
apachectl status
|
||||
;;
|
||||
|
||||
full-server-status|fullstatus)
|
||||
apachectl fullstatus
|
||||
;;
|
||||
|
||||
*)
|
||||
cat >&2 <<-EOF
|
||||
Usage: $0 <command> <server flags>
|
||||
|
||||
where <command> is one of:
|
||||
start - start httpd
|
||||
startssl - start httpd with -DSSL
|
||||
stop - stop httpd (sending SIGTERM to parent)
|
||||
try-restart - stop httpd and if this succeeds (i.e. if
|
||||
it was running before), start it again.
|
||||
|
||||
status - check whether httpd is running
|
||||
|
||||
restart - stop httpd if running; start httpd
|
||||
restart-graceful - stop httpd gracefully if running; start httpd
|
||||
reload|graceful - do a graceful restart by sending a SIGUSR1, or
|
||||
start if not running
|
||||
stop-graceful - stop httpd (sending SIGWINCH to parent)
|
||||
|
||||
configtest - do a configuration syntax test
|
||||
extreme-configtest - try to run httpd as nobody (detects more errors
|
||||
by actually loading the configuration, but cannot
|
||||
read SSL certificates)
|
||||
probe - probe for the necessity of a reload, give
|
||||
out the argument which is required for a reload.
|
||||
(by comparing conf files with pidfile timestamp)
|
||||
|
||||
full-server-status - dump a full status screen; requires lynx or w3m
|
||||
and mod_status enabled
|
||||
server-status - dump a short status screen; requires lynx or w3m
|
||||
and mod_status enabled
|
||||
|
||||
help - this screen
|
||||
|
||||
optional server flags are passed through to httpd.
|
||||
|
||||
EOF
|
||||
exit 1
|
||||
esac
|
||||
|
||||
|
||||
# Inform the caller not only verbosely and set an exit status.
|
||||
rc_exit
|
11
robots.txt
11
robots.txt
@ -1,11 +0,0 @@
|
||||
# exclude help system from robots
|
||||
User-agent: *
|
||||
Disallow: /manual/
|
||||
Disallow: /doc/
|
||||
Disallow: /gif/
|
||||
# but allow htdig to index our doc-tree
|
||||
User-agent: susedig
|
||||
Disallow:
|
||||
# disallow stress test
|
||||
user-agent: stress-agent
|
||||
Disallow: /
|
137
sysconf_addword
137
sysconf_addword
@ -1,137 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Copyright 2005 Peter Poeml <apache@suse.de>. All Rights Reserved.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
|
||||
|
||||
debug=false
|
||||
|
||||
function usage() {
|
||||
cat <<-EOF
|
||||
usage: $(basename $0) [-r] FILE VAR WORD
|
||||
|
||||
Add word WORD to variable VAR in file FILE, or remove
|
||||
it if the -r option is given.
|
||||
|
||||
Example:
|
||||
$(basename $0) /etc/sysconfig/apache2 APACHE_SERVER_FLAGS asdf
|
||||
leads to the change:
|
||||
-APACHE_SERVER_FLAGS="SSL STATUS ruby"
|
||||
+APACHE_SERVER_FLAGS="SSL STATUS ruby asdf"
|
||||
|
||||
If multiple lines matching ^VAR= are found (which happens to be a habit of
|
||||
mine), only the last one is manipulated.
|
||||
|
||||
It does not work for WORD starting with characters like a dash which
|
||||
prevent word boundary matching.
|
||||
|
||||
EOF
|
||||
}
|
||||
|
||||
function find_last_occurrence () {
|
||||
# takes two arguments, FILE and VAR
|
||||
# and return the number of the last line where
|
||||
# VAR occurs in FILE (not commented)
|
||||
grep -n -- "^[[:space:]]*$1" $2 | tail -n 1 | cut -d: -f1
|
||||
}
|
||||
|
||||
function word_present () {
|
||||
. $file
|
||||
case " ${!var} " in
|
||||
*" $word "*) true;;
|
||||
*) false;;
|
||||
esac
|
||||
}
|
||||
|
||||
function add_word() {
|
||||
local word=$1
|
||||
local word_quoted=$2
|
||||
if ! word_present; then
|
||||
$debug && cp $file $tmpf
|
||||
sed -i -e "${lineno} {
|
||||
s/^[[:space:]]*\($var=\".*\)\(\".*\)/\1 $word_quoted\2/;
|
||||
s/=\" /=\"/
|
||||
}" $file
|
||||
$debug && diff -u $tmpf $file
|
||||
else
|
||||
echo \"$word\" already present
|
||||
fi
|
||||
# some balancing for vim"s syntax highlighting
|
||||
}
|
||||
|
||||
function remove_word() {
|
||||
local word=$1
|
||||
local word_quoted=$2
|
||||
if word_present; then
|
||||
$debug && cp $file $tmpf
|
||||
sed -i -e "${lineno} {
|
||||
s/\(['\" ]\)$word_quoted\(['\" ]\)/\1 \2/g
|
||||
s/ / /g
|
||||
}" $file
|
||||
$debug && diff -u $tmpf $file
|
||||
else
|
||||
echo \"$word\" not present
|
||||
fi
|
||||
# some balancing for vim"s syntax highlighting
|
||||
|
||||
}
|
||||
|
||||
# poor man's option parsing
|
||||
|
||||
case "$1" in
|
||||
-h) usage; exit 0;;
|
||||
esac
|
||||
|
||||
if [ $# -lt 3 ]; then
|
||||
echo not enough arguments
|
||||
echo
|
||||
usage; exit 1
|
||||
fi
|
||||
|
||||
action=add
|
||||
case "$1" in
|
||||
-r) action=remove; shift;;
|
||||
esac
|
||||
|
||||
file=$1; shift
|
||||
var=$1; shift
|
||||
word=$1
|
||||
word_quoted=${1//\//\\\/}
|
||||
|
||||
|
||||
if $debug; then
|
||||
echo FILE: $file
|
||||
echo VAR: $var
|
||||
echo WORD: $word
|
||||
echo current content:
|
||||
grep "^$var=" $file | tail -n 1
|
||||
echo
|
||||
fi
|
||||
|
||||
|
||||
if ! [ -r $file ]; then
|
||||
echo ${0##*/}: file $file is not a readable file
|
||||
exit 1
|
||||
fi
|
||||
|
||||
lineno=$(find_last_occurrence $var $file)
|
||||
if [ -z $lineno ]; then
|
||||
echo ${0##*/}: variable $var does not occur in $file
|
||||
exit 1
|
||||
fi
|
||||
|
||||
$debug && tmpf=$(mktemp /tmp/$(basename $0).XXXXXX)
|
||||
|
||||
if [ $action = add ]; then
|
||||
add_word $word $word_quoted $lineno
|
||||
else
|
||||
remove_word $word $word_quoted $lineno
|
||||
fi
|
||||
|
||||
$debug && rm -f $tmpf
|
||||
|
||||
exit 0
|
@ -125,13 +125,8 @@ APACHE_HTTPD_CONF=""
|
||||
#
|
||||
# MPM (multi-processing module) to use.
|
||||
#
|
||||
# Needed to determine with which MPM apache will run, as well as
|
||||
# against which header files modules will be built.
|
||||
#
|
||||
# If not set, the system will simply pick one of the installed MPMs.
|
||||
#
|
||||
# The implementation of the logic is in /usr/share/apache2/find_mpm,
|
||||
# a script which can be used standalone as well if needed.
|
||||
# Needed to determine with which MPM apache will run (when run
|
||||
# via systemd service).
|
||||
#
|
||||
APACHE_MPM=""
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user