source: server/major/apache.xml@ 9401155

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt perl-modules plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 9401155 was e9cab664, checked in by Pierre Labastie <pieere@…>, 7 years ago

Apache-2.4.26 and explanation for
GCC include-fixed headers

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

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