1 | *****************************************
|
---|
2 | README:
|
---|
3 | runtime-src/packages/apache-httpd
|
---|
4 | *****************************************
|
---|
5 |
|
---|
6 | This Readme explains the customisations made Apache Httpd
|
---|
7 | zipped files in this folder.
|
---|
8 |
|
---|
9 | ********************************************************************************************
|
---|
10 | (A) FILE: httpd-2.2.11-gs.tar.gz: Apache Httpd 2 src code with
|
---|
11 | modifications for Greenstone.
|
---|
12 | ********************************************************************************************
|
---|
13 |
|
---|
14 | Sep 2022 - kjdon
|
---|
15 |
|
---|
16 | I have updated a few of the windows files so that it will compile using Visual Studio 2017. Note, I'm not sure what version below this is the cutoff for these
|
---|
17 | changes not to be needed.
|
---|
18 | Also note, the windows version of 2.2.11 is for win32, so you need to use vcvars32, not vcvars64 when setting up Visual Studio environment.
|
---|
19 |
|
---|
20 | The following files were modified. All mods are signalled with kjdon 2022 in comments. The help pages where I found these solutions plus some info from them detailed also.
|
---|
21 |
|
---|
22 | ***** ./httpd-2.2.11/srclib/apr/atomic/win32/apr_atomic.c
|
---|
23 | ---------------------------------------------------------
|
---|
24 |
|
---|
25 | see https://marc.info/?l=apr-dev&m=138386228311375&w=2
|
---|
26 |
|
---|
27 |
|
---|
28 | In the Platform Toolset v120 (VS2013), the function InterlockedIncrement() and the friends are specified with
|
---|
29 |
|
---|
30 | #pragma intrinsic(_InterlockedIncrement)
|
---|
31 |
|
---|
32 | for all the platforms, including x86. Whereas in the former versions of SDK, the intrisnic pragma directive is used for x64 but NOT for x86. I can clearly see the difference comparing the header files. And there doesn't seem to be any defines which would allow us to revert the behavior.
|
---|
33 |
|
---|
34 | Thus, the function casts introduced in apr_atomic.c resolve/work for former versions but cause link errors with v120 since the function calls for x86 are now intrinsic as they have been for x64.
|
---|
35 |
|
---|
36 | Given all these differences between platforms and toolset versions, I'd simply not use the function cast wrappers but still take care of the differences between APR and underlying Windows interfaces.)
|
---|
37 |
|
---|
38 | ***** ./httpd-2.2.11/srclib/apr-iconv/build/modules.mk.win
|
---|
39 | ----------------------------------------------------------
|
---|
40 |
|
---|
41 | see https://stackoverflow.com/questions/36897691/compile-apache-apr-on-windows
|
---|
42 |
|
---|
43 | ***** ./httpd-2.2.11/support/win32/ApacheMonitor.c
|
---|
44 | ---------------------------------------------------
|
---|
45 |
|
---|
46 | see https://lists.apache.org/thread/9rkox41zmhc6g1nb1jx4h9ph02zklkrv
|
---|
47 |
|
---|
48 | setargv() is supposed to read in the console args because that's a GUI app
|
---|
49 | and they have to use WinMain. For that to work, one should actually link
|
---|
50 | with setargv.obj
|
---|
51 | https://msdn.microsoft.com/en-us/library/8bch7bkk%28v=vs.140%29.aspx . That
|
---|
52 | is not being done, so not sure how it even works with VC9/VC11. First I
|
---|
53 | tried to declare UNICODE, but that's a bad idea - the whole app isn't
|
---|
54 | prepared for that. Thus, I've tried to remove the _setargv() call.
|
---|
55 |
|
---|
56 | That worked - under VC14 argv seems to be set
|
---|
57 |
|
---|
58 |
|
---|
59 | ******************************************************************
|
---|
60 |
|
---|
61 | This Readme file was originally created on 22 July 2010. The dates in
|
---|
62 | the commit messages below, upto and including point 6, are relative to
|
---|
63 | this. Some more notes to do with Apache Httpd and how Greenstone
|
---|
64 | compiles and installs it (including upon Installation of Greenstone) are
|
---|
65 | at the bottom.
|
---|
66 |
|
---|
67 | * Apache Httpd 2, whose unmodified source code was
|
---|
68 | originally being compiled up on Linux alone. The first
|
---|
69 | greenstone-modified version was added to include windows makefiles
|
---|
70 | to compile the Linux source code.
|
---|
71 |
|
---|
72 | The httpd tar.gz file works with the files httpd.conf.in for linux and
|
---|
73 | windows-httpd.conf.in for windows.
|
---|
74 | http://trac.greenstone.org/browser/gsdl/trunk/runtime-src/packages/apache-httpd/windows-httpd.conf.in?rev=20171
|
---|
75 | Revision 20171, 17.6 KB (checked in by ak19, 12 months ago) explains:
|
---|
76 | "Windows httpd.conf.in file is not the same as the one for linux and
|
---|
77 | darwin (Mac), since one gets the Modules Already Loaded message on
|
---|
78 | Linux if the existing httpd.conf.in was interchanged with the Windows
|
---|
79 | one."
|
---|
80 |
|
---|
81 |
|
---|
82 | 1. http://trac.greenstone.org/browser/gsdl/trunk/runtime-src/packages/apache-httpd/httpd-2.2.11-gs.tar.gz?rev=20169
|
---|
83 |
|
---|
84 | Revision 20169, 7.9 MB (checked in by ak19, 12 months ago)
|
---|
85 |
|
---|
86 | Adding the customised apache web server source folder: a linux source
|
---|
87 | release plus apache's official windows makefiles. Now it compiles up
|
---|
88 | on both OS.
|
---|
89 |
|
---|
90 | * Property svn:mime-type set to application/octet-stream
|
---|
91 |
|
---|
92 |
|
---|
93 | 2. http://trac.greenstone.org/browser/gsdl/trunk/runtime-src/packages/apache-httpd/httpd-2.2.11-gs.tar.gz?rev=20349
|
---|
94 |
|
---|
95 | Revision 20349, 7.9 MB (checked in by ak19, 11 months ago)
|
---|
96 |
|
---|
97 | Dr Bainbridge fixed the configure.in (and generated the configure file
|
---|
98 | from it) so that it generates the libexpat.so.0 file it needs. This
|
---|
99 | way the apache web server won't look elsewhere for the so file and
|
---|
100 | perhaps find an incompatible version of it.
|
---|
101 |
|
---|
102 | * Property svn:mime-type set to application/octet-stream
|
---|
103 |
|
---|
104 |
|
---|
105 | 3. http://trac.greenstone.org/browser/gsdl/trunk/runtime-src/packages/apache-httpd/httpd-2.2.11-gs.tar.gz?rev=20668
|
---|
106 |
|
---|
107 | Revision 20668, 7.9 MB (checked in by davidb, 10 months ago)
|
---|
108 |
|
---|
109 | better to include builtin libiconv support. Should prevent .so version
|
---|
110 | conflicts on Mac
|
---|
111 |
|
---|
112 | * Property svn:mime-type set to application/octet-stream
|
---|
113 |
|
---|
114 |
|
---|
115 | 4. http://trac.greenstone.org/browser/gsdl/trunk/runtime-src/packages/apache-httpd/httpd-2.2.11-gs.tar.gz?rev=20850
|
---|
116 |
|
---|
117 | Revision 20850, 7.7 MB (checked in by ak19, 9 months ago)
|
---|
118 |
|
---|
119 | Teaches the apache web server being compiled up where the static
|
---|
120 | libiconv lib file, libiconv.a, is to be found (which greenstone would
|
---|
121 | have compiled up during the greenstone configure stage). The
|
---|
122 | with-iconv flag is set in runtime-src/packages/configure file to point
|
---|
123 | to the common-src/packages/iconv folder wherein the lib folder
|
---|
124 | contains the generated libiconv.a file. The apache server tar file is
|
---|
125 | updated as well: no longer does it add the with-iconv flag explicitly
|
---|
126 | since this is now already set at a higher up level and is passed down
|
---|
127 | to it.
|
---|
128 |
|
---|
129 | * Property svn:mime-type set to application/octet-stream
|
---|
130 |
|
---|
131 |
|
---|
132 | 5. http://trac.greenstone.org/browser/gsdl/trunk/runtime-src/packages/apache-httpd/httpd-2.2.11-gs.tar.gz?rev=20892
|
---|
133 |
|
---|
134 | Revision 20892, 7.7 MB (checked in by oranfry, 9 months ago)
|
---|
135 |
|
---|
136 | the change I think will force apr not to use sendfile
|
---|
137 |
|
---|
138 | * Property svn:mime-type set to application/octet-stream
|
---|
139 |
|
---|
140 |
|
---|
141 | 6. http://trac.greenstone.org/browser/gsdl/trunk/runtime-src/packages/apache-httpd/httpd-2.2.11-gs.tar.gz?rev=20893
|
---|
142 | (http://trac.greenstone.org/browser/main/trunk/greenstone2/runtime-src/packages/apache-httpd/httpd-2.2.11-gs.tar.gz)
|
---|
143 |
|
---|
144 | Revision 20893, 7.9 MB (checked in by ak19, 9 months ago)
|
---|
145 |
|
---|
146 | Dr Bainbridge updated srclib/apr/configure.in so that sendfile is set
|
---|
147 | to 0 for Darwin (Mac) to tell Darwin systems that we won't be working
|
---|
148 | with calls to sendfile, since Tiger OS does not have sendfile even
|
---|
149 | though we are compiling on Leopard which does.
|
---|
150 |
|
---|
151 | * Property svn:mime-type set to application/octet-stream
|
---|
152 |
|
---|
153 |
|
---|
154 |
|
---|
155 | *****************************************************************
|
---|
156 | NOTES ON COMPILING AND INSTALLING APACHE HTTPD 2.2 FOR GREENSTONE
|
---|
157 | *****************************************************************
|
---|
158 |
|
---|
159 | The Relocatable Apache web server:
|
---|
160 |
|
---|
161 |
|
---|
162 | A) RELEASE KIT needs to run:
|
---|
163 |
|
---|
164 | 1. ./configure --enable-apache-httpd
|
---|
165 | 2. make
|
---|
166 | 3. make install
|
---|
167 | 4. make apache-for-dist
|
---|
168 |
|
---|
169 |
|
---|
170 | B) INSTALLER needs to:
|
---|
171 |
|
---|
172 | 1. Copy the compiled up apache-httpd folder and put it into its
|
---|
173 | destination for installation:
|
---|
174 | GSDLHOME/apache-httpd.
|
---|
175 |
|
---|
176 | X 2. Not necessary:
|
---|
177 | cd into there and into the linux (=GSDLOS) folder in there:
|
---|
178 | cd <GSDLHOME>/apache-httpd/linux
|
---|
179 |
|
---|
180 | 3. Run the script install-bindist.sh (in apache-httpd/<GSDLOS> folder)
|
---|
181 | passing as argument: <GSDLHOME>/apache-httpd/linux
|
---|
182 |
|
---|
183 | 4. Now it should be good to go: can run the webserver after
|
---|
184 | configuring the port (in linux/conf/httpd.conf) as follows
|
---|
185 | ./bin/apachectl start
|
---|
186 |
|
---|
187 | - Change port in httpd.conf file
|
---|
188 | - run gs2-server.sh
|
---|
189 |
|
---|