source: server/major/apache.xml@ a4f3726

10.0 10.1 11.0 11.1 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind lazarus perl-modules qt5new trunk upgradedb xry111/intltool xry111/test-20220226
Last change on this file since a4f3726 was a4f3726, checked in by DJ Lucas <dj@…>, 5 years ago

Update to OpenSSL-1.1.0f. Fixes #8214.
Update to OpenSSL Libraries 1.0.2l. Fixes #9282.
Remove Re-alpine and raplaced with Alpine-2.21.

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@18783 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 17.4 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6
7 <!ENTITY apache-download-http
8 "https://archive.apache.org/dist/httpd/httpd-&apache-version;.tar.bz2">
9 <!ENTITY apache-download-ftp " ">
10 <!ENTITY apache-md5sum "2826f49619112ad5813c0be5afcc7ddb">
11 <!ENTITY apache-size "6.1 MB">
12 <!ENTITY apache-buildsize "76 MB">
13 <!ENTITY apache-time "0.7 SBU">
14]>
15
16<sect1 id="apache" xreflabel="Apache-&apache-version;">
17 <?dbhtml filename="apache.html"?>
18
19 <sect1info>
20 <othername>$LastChangedBy$</othername>
21 <date>$Date$</date>
22 </sect1info>
23
24 <title>Apache-&apache-version;</title>
25
26 <indexterm zone="apache">
27 <primary sortas="a-Apache">Apache</primary>
28 </indexterm>
29
30 <sect2 role="package">
31 <title>Introduction to Apache HTTPD</title>
32
33 <para>
34 The <application>Apache HTTPD</application> package contains an open-source HTTP
35 server. It is useful for creating local intranet web sites or running huge
36 web serving operations.
37 </para>
38
39 &lfs80_checked;
40
41 <bridgehead renderas="sect3">Package Information</bridgehead>
42 <itemizedlist spacing="compact">
43 <listitem>
44 <para>
45 Download (HTTP): <ulink url="&apache-download-http;"/>
46 </para>
47 </listitem>
48 <listitem>
49 <para>
50 Download (FTP): <ulink url="&apache-download-ftp;"/>
51 </para>
52 </listitem>
53 <listitem>
54 <para>
55 Download MD5 sum: &apache-md5sum;
56 </para>
57 </listitem>
58 <listitem>
59 <para>
60 Download size: &apache-size;
61 </para>
62 </listitem>
63 <listitem>
64 <para>
65 Estimated disk space required: &apache-buildsize;
66 </para>
67 </listitem>
68 <listitem>
69 <para>
70 Estimated build time: &apache-time;
71 </para>
72 </listitem>
73 </itemizedlist>
74
75 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
76 <itemizedlist spacing="compact">
77 <listitem>
78 <para>
79 Required patch:
80 <ulink url="&patch-root;/httpd-&apache-version;-blfs_layout-1.patch"/>
81 </para>
82 </listitem>
83 <listitem>
84 <para>Required patch: <ulink url="&patch-root;/httpd-&apache-version;-openssl-1.1.0-1.patch"/></para>
85 </listitem>
86 </itemizedlist>
87
88 <bridgehead renderas="sect3">Apache HTTPD Dependencies</bridgehead>
89
90 <bridgehead renderas="sect4">Required</bridgehead>
91 <para role="required">
92 <xref linkend="apr-util"/> and
93 <xref linkend="pcre"/>
94 </para>
95
96 <bridgehead renderas="sect4">Recommended</bridgehead>
97 <para role="recommended">
98 <xref linkend="openssl"/>
99 </para>
100
101 <bridgehead renderas="sect4">Optional</bridgehead>
102 <para role="optional">
103 <xref linkend="db"/>,
104 <xref linkend="doxygen"/>,
105 <xref linkend="libxml2"/>,
106 <xref linkend="lynx"/> or
107 <xref linkend="Links"/> or
108 <ulink url="http://elinks.or.cz/">ELinks</ulink>,
109 <xref linkend="nghttp2"/>,
110 <xref linkend="openldap"/> (<xref linkend="apr-util"/> needs to be
111 installed with ldap suport),
112 <xref linkend="rsync"/>,
113 <ulink url="https://sourceforge.net/projects/distcache">Distcache</ulink>, and
114 <xref linkend="lua"/>
115 </para>
116
117 <para condition="html" role="usernotes">
118 User Notes: <ulink url="&blfs-wiki;/apache"/>
119 </para>
120 </sect2>
121
122 <sect2 role="installation">
123 <title>Installation of Apache HTTPD</title>
124
125 <para>
126 For security reasons, running the server as an unprivileged user and group
127 is strongly encouraged. Create the following group and user using the
128 following commands as <systemitem class="username">root</systemitem>:
129 </para>
130
131<screen role="root"><userinput>groupadd -g 25 apache &amp;&amp;
132useradd -c "Apache Server" -d /srv/www -g apache \
133 -s /bin/false -u 25 apache</userinput></screen>
134
135 <para>
136 Build and install <application>Apache HTTPD</application> by running the
137 following commands:
138 </para>
139
140<screen><userinput>
141patch -Np1 -i ../httpd-&apache-version;-blfs_layout-1.patch &amp;&amp;
142patch -Np1 -i ../httpd-&apache-version;-openssl-1.1.0-1.patch &amp;&amp;
143
144sed '/dir.*CFG_PREFIX/s@^@#@' -i support/apxs.in &amp;&amp;
145
146./configure --enable-authnz-fcgi \
147 --enable-layout=BLFS \
148 --enable-mods-shared="all cgi" \
149 --enable-mpms-shared=all \
150 --enable-suexec=shared \
151 --with-apr=/usr/bin/apr-1-config \
152 --with-apr-util=/usr/bin/apu-1-config \
153 --with-suexec-bin=/usr/lib/httpd/suexec \
154 --with-suexec-caller=apache \
155 --with-suexec-docroot=/srv/www \
156 --with-suexec-logfile=/var/log/httpd/suexec.log \
157 --with-suexec-uidmin=100 \
158 --with-suexec-userdir=public_html &amp;&amp;
159make</userinput></screen>
160
161 <para>
162 This package does not come with a test suite.
163 </para>
164
165 <para>
166 Now, as the <systemitem class="username">root</systemitem> user:
167 </para>
168
169 <note><para>This package does not install properly using DESTDIR
170 techniques as an unpriviledged user.</para></note>
171
172<screen role="root"><userinput>make install &amp;&amp;
173
174mv -v /usr/sbin/suexec /usr/lib/httpd/suexec &amp;&amp;
175chgrp apache /usr/lib/httpd/suexec &amp;&amp;
176chmod 4754 /usr/lib/httpd/suexec &amp;&amp;
177
178chown -v -R apache:apache /srv/www</userinput></screen>
179
180 </sect2>
181
182 <sect2 role="commands">
183 <title>Command Explanations</title>
184
185 <para>
186 <command>sed '/dir.*CFG_PREFIX/s@^@#@'...</command>: Forces the
187 <application>apxs</application> utility to use absolute pathnames for
188 modules, when instructed to do so.
189 </para>
190
191 <para>
192 <parameter>--enable-authnz-fcgi</parameter>: Build FastCGI
193 authorizer-based authentication and authorization (mod_authnz_fcgi.so
194 fast CGI module).
195 </para>
196
197 <para>
198 <parameter>--enable-mods-shared="all cgi"</parameter>: The modules should be
199 compiled and used as Dynamic Shared Objects (DSOs) so they can be included
200 and excluded from the server using the run-time configuration directives.
201 </para>
202
203 <para>
204 <parameter>--enable-mpms-shared=all</parameter>: This switch ensures that
205 all MPM (Multi Processing Modules) are built as Dynamic Shared Objects
206 (DSOs), so the user can choose which one to use at runtime.
207 </para>
208
209 <para>
210 <parameter>--enable-suexec</parameter>: This switch enables building of the
211 <application>Apache</application> suEXEC module which can be used to allow
212 users to run CGI and SSI scripts under user IDs different from the user ID
213 of the calling web server.
214 </para>
215
216 <para>
217 <parameter>--with-suexec-*</parameter>: These switches control suEXEC module
218 behavior, such as default document root, minimal UID that can be used to
219 run the script under the suEXEC. Please note that with minimal UID 100, you
220 can't run CGI or SSI scripts under suEXEC as the
221 <systemitem class="username">apache</systemitem> user.
222 </para>
223
224 <para>
225 <command>... /usr/lib/httpd/suexec</command>: These commands put
226 <command>suexec</command> wrapper into proper location, since it
227 is not meant to be run directly. They also adjust proper
228 permissions of the binary, making it setgid
229 <systemitem class="username">apache</systemitem>.
230 </para>
231
232 <para>
233 <command>chown -R apache:apache /srv/www</command>: By default, the
234 installation process installs files (documentation, error messages,
235 default icons, etc.) with the ownership of the user that extracted the
236 files from the tar file. If you want to change the ownership to another
237 user, you should do so at this point. The only requirement is that the
238 document directories need to be accessible by the <command>httpd</command>
239 process with (r-x) permissions and files need to be readable (r--) by the
240 <systemitem class="username">apache</systemitem> user.
241 </para>
242
243 </sect2>
244
245 <sect2 role="configuration">
246 <title>Configuring Apache</title>
247
248 <sect3 id="apache-config">
249 <title>Config Files</title>
250
251 <para>
252 <filename>/etc/httpd/httpd.conf</filename> and
253 <filename>/etc/httpd/extra/*</filename>
254 </para>
255
256 <indexterm zone="apache apache-config">
257 <primary sortas="e-etc-httpd-httpd.conf">/etc/httpd/httpd.conf</primary>
258 </indexterm>
259
260 <indexterm zone="apache apache-config">
261 <primary sortas="e-etc-httpd-extra-star">/etc/httpd/extra/*</primary>
262 </indexterm>
263
264 </sect3>
265
266 <sect3>
267 <title>Configuration Information</title>
268
269 <para>
270 See <ulink url="file:///usr/share/httpd/manual/configuring.html"/>
271 for detailed instructions on customising your
272 <application>Apache</application> HTTP server configuration file.
273 </para>
274
275 </sect3>
276
277 <sect3 id="httpd-init">
278 <title><phrase revision="sysv">Boot Script</phrase>
279 <phrase revision="systemd">Systemd Unit</phrase></title>
280
281 <para>
282 If you want the <application>Apache</application> server to
283 start automatically when the system is booted, install the
284 <phrase revision="sysv"><filename>/etc/rc.d/init.d/httpd</filename>
285 init script</phrase>
286 <phrase revision="systemd"><filename>httpd.service</filename>
287 unit</phrase> included in the
288 <xref linkend="bootscripts" revision="sysv"/>
289 <xref linkend="systemd-units" revision="systemd"/> package.
290 </para>
291
292 <indexterm zone="apache httpd-init">
293 <primary sortas="f-apache">apache</primary>
294 </indexterm>
295
296<screen role="root"><userinput>make install-httpd</userinput></screen>
297
298 </sect3>
299
300 </sect2>
301
302 <sect2 role="content">
303 <title>Contents</title>
304
305 <segmentedlist>
306 <segtitle>Installed Programs</segtitle>
307 <segtitle>Installed Libraries</segtitle>
308 <segtitle>Installed Directories</segtitle>
309
310 <seglistitem>
311 <seg>
312 ab, apachectl, apxs, checkgid, dbmmanage, fcgistarter,
313 htcacheclean, htdbm, htdigest, htpasswd, httpd,
314 httxt2dbm, logresolve, rotatelogs, and suexec
315 </seg>
316 <seg>
317 Several libraries under /usr/lib/httpd/modules/
318 </seg>
319 <seg>
320 /etc/httpd,
321 /srv/www,
322 /usr/include/httpd,
323 /usr/lib/httpd,
324 /usr/share/httpd,
325 /var/log/httpd, and
326 /var/run/httpd
327 </seg>
328 </seglistitem>
329 </segmentedlist>
330
331 <variablelist>
332 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
333 <?dbfo list-presentation="list"?>
334 <?dbhtml list-presentation="table"?>
335
336 <varlistentry id="ab">
337 <term><command>ab</command></term>
338 <listitem>
339 <para>
340 is a tool for benchmarking your <application>Apache</application>
341 HTTP server.
342 </para>
343 <indexterm zone="apache ab">
344 <primary sortas="b-ab">ab</primary>
345 </indexterm>
346 </listitem>
347 </varlistentry>
348
349 <varlistentry id="apachectl">
350 <term><command>apachectl</command></term>
351 <listitem>
352 <para>
353 is a front end to the <application>Apache</application> HTTP server
354 which is designed to help the administrator control the functioning
355 of the <application>Apache</application> httpd daemon.
356 </para>
357 <indexterm zone="apache apachectl">
358 <primary sortas="b-apachectl">apachectl</primary>
359 </indexterm>
360 </listitem>
361 </varlistentry>
362
363 <varlistentry id="apxs">
364 <term><command>apxs</command></term>
365 <listitem>
366 <para>
367 is a tool for building and installing extension modules for the
368 <application>Apache</application> HTTP server.
369 </para>
370 <indexterm zone="apache apxs">
371 <primary sortas="b-apxs">apxs</primary>
372 </indexterm>
373 </listitem>
374 </varlistentry>
375
376 <varlistentry id="checkgid">
377 <term><command>checkgid</command></term>
378 <listitem>
379 <para>
380 is a program that checks whether it can setgid to the group
381 specified. This is to see if it is a valid group for Apache2 to use
382 at runtime. If the user (should be run as superuser) is in that
383 group, or can setgid to it, it will return 0.
384 </para>
385 <indexterm zone="apache checkgid">
386 <primary sortas="b-checkgid">checkgid</primary>
387 </indexterm>
388 </listitem>
389 </varlistentry>
390
391 <varlistentry id="dbmmanage">
392 <term><command>dbmmanage</command></term>
393 <listitem>
394 <para>
395 is used to create and update the DBM format files used to store
396 usernames and passwords for basic authentication of HTTP users.
397 </para>
398 <indexterm zone="apache dbmmanage">
399 <primary sortas="b-dbmmanage">dbmmanage</primary>
400 </indexterm>
401 </listitem>
402 </varlistentry>
403
404 <varlistentry id="fcgistarter">
405 <term><command>fcgistarter</command></term>
406 <listitem>
407 <para>
408 is a tool to start a FastCGI program.
409 </para>
410 <indexterm zone="apache fcgistarter">
411 <primary sortas="b-fcgistarter">fcgistarter</primary>
412 </indexterm>
413 </listitem>
414 </varlistentry>
415
416 <varlistentry id="htcacheclean">
417 <term><command>htcacheclean</command></term>
418 <listitem>
419 <para>
420 is used to clean up the disk cache.
421 </para>
422 <indexterm zone="apache htcacheclean">
423 <primary sortas="b-htcacheclean">htcacheclean</primary>
424 </indexterm>
425 </listitem>
426 </varlistentry>
427
428 <varlistentry id="htdbm">
429 <term><command>htdbm</command></term>
430 <listitem>
431 <para>
432 is used to manipulate the DBM password databases.
433 </para>
434 <indexterm zone="apache htdbm">
435 <primary sortas="b-htdbm">htdbm</primary>
436 </indexterm>
437 </listitem>
438 </varlistentry>
439
440 <varlistentry id="htdigest">
441 <term><command>htdigest</command></term>
442 <listitem>
443 <para>
444 is used to create and update the flat-files used to store usernames,
445 realms and passwords for digest authentication of HTTP users.
446 </para>
447 <indexterm zone="apache htdigest">
448 <primary sortas="b-htdigest">htdigest</primary>
449 </indexterm>
450 </listitem>
451 </varlistentry>
452
453 <varlistentry id="htpasswd">
454 <term><command>htpasswd</command></term>
455 <listitem>
456 <para>
457 is used to create and update the flat-files used to store usernames
458 and passwords for basic authentication of HTTP users.
459 </para>
460 <indexterm zone="apache htpasswd">
461 <primary sortas="b-htpasswd">htpasswd</primary>
462 </indexterm>
463 </listitem>
464 </varlistentry>
465
466 <varlistentry id="httpd">
467 <term><command>httpd</command></term>
468 <listitem>
469 <para>
470 is the <application>Apache</application> HTTP server program.
471 </para>
472 <indexterm zone="apache httpd">
473 <primary sortas="b-httpd">httpd</primary>
474 </indexterm>
475 </listitem>
476 </varlistentry>
477
478 <varlistentry id="httxt2dbm">
479 <term><command>httxt2dbm</command></term>
480 <listitem>
481 <para>
482 is used to generate DBM files from text, for use in RewriteMap.
483 </para>
484 <indexterm zone="apache httxt2dbm">
485 <primary sortas="b-httxt2dbm">httxt2dbm</primary>
486 </indexterm>
487 </listitem>
488 </varlistentry>
489
490 <varlistentry id="logresolve">
491 <term><command>logresolve</command></term>
492 <listitem>
493 <para>
494 is a post-processing program to resolve IP-addresses in
495 <application>Apache</application>'s access log files.
496 </para>
497 <indexterm zone="apache logresolve">
498 <primary sortas="b-logresolve">logresolve</primary>
499 </indexterm>
500 </listitem>
501 </varlistentry>
502
503 <varlistentry id="rotatelogs">
504 <term><command>rotatelogs</command></term>
505 <listitem>
506 <para>
507 is a simple program for use in conjunction with
508 <application>Apache</application>'s piped log file feature.
509 </para>
510 <indexterm zone="apache rotatelogs">
511 <primary sortas="b-rotatelogs">rotatelogs</primary>
512 </indexterm>
513 </listitem>
514 </varlistentry>
515
516 <varlistentry id="suexec">
517 <term><command>suexec</command></term>
518 <listitem>
519 <para>
520 allows users to run CGI and SSI applications as a different user.
521 </para>
522 <indexterm zone="apache suexec">
523 <primary sortas="b-suexec">suexec</primary>
524 </indexterm>
525 </listitem>
526 </varlistentry>
527
528 </variablelist>
529
530 </sect2>
531
532</sect1>
Note: See TracBrowser for help on using the repository browser.