source: server/major/apache.xml@ f6b8ec7b

trunk
Last change on this file since f6b8ec7b was f6b8ec7b, checked in by Tim Tassonis <stuff@…>, 2 months ago

Update to httpd-2.4.48.

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