2 # This is a patch to make lingerd work with Apache and mod_ssl together.
4 # Installation instructions:
6 # 1) untar apache, mod_ssl and lingerd
8 # 2) install mod_ssl, per the instructions in mod_ssl_2.x/INSTALL,
9 # using "the flexible APACI-only way", which copies files over into
10 # apache's source tree, but doesn't compile Apache just yet.
12 # 3) install lingerd per the instructions in lingerd-0.9x/INSTALL.
13 # when patching the Apache source, use aplinger-ssl.diff (this file)
14 # instead of the regular apache-1.3/aplinger.diff.
17 --- apache_1.3.39/src/main/Makefile.tmpl.org Sat Dec 2 16:09:32 2000
18 +++ apache_1.3.39/src/main/Makefile.tmpl Sat Dec 2 16:23:34 2000
20 LDFLAGS=$(LDFLAGS1) $(EXTRA_LDFLAGS)
23 -HEADERS= test_char.h uri_delims.h
24 +HEADERS= test_char.h uri_delims.h li_config.h
26 OBJS= alloc.o buff.o \
27 http_config.o http_core.o http_log.o \
28 http_main.o http_protocol.o http_request.o http_vhost.o \
29 util.o util_date.o util_script.o util_uri.o util_md5.o \
31 + rfc1413.o ap_lingerd.o
34 $(CC) -c $(INCLUDES) $(CFLAGS) $<
35 --- apache_1.3.39/src/main/http_main.c~ 2007-10-23 01:51:50.000000000 +0300
36 +++ apache_1.3.39/src/main/http_main.c 2007-10-23 01:52:32.306586698 +0300
38 #include "http_vhost.h"
39 #include "util_script.h" /* to force util_script.c linking */
42 +#include "li_config.h"
43 +void lingerd_connect(void);
44 +int lingerd_sendfd(int);
45 #include "scoreboard.h"
46 #include "multithread.h"
48 @@ -1575,6 +1578,19 @@
53 + * Try to feed the socket to the linger daemon. If it fails and
54 + * we're configured to do so, do a lingering close anyway.
55 + * Otherwise just close the socket; lingerd will linger on its copy
59 + if (lingerd_sendfd(lsd) == 0 || !(LINGER_ON_FAILURE)) {
60 + ap_bclose(r->connection->client);
65 /* Set up to wait for readable data on socket... */
69 ap_server_config_defines = ap_make_array(pcommands, 1, sizeof(char *));
70 pid_table = ap_make_table(pglobal, HARD_SERVER_LIMIT);
76 ap_hook_configure("ap::buff::read",