source: server/major/apache.xml@ e9cab664

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 e9cab664 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
RevLine 
[08254fc]1<?xml version="1.0" encoding="ISO-8859-1"?>
[6732c094]2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
[08254fc]4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6
[6041710]7 <!ENTITY apache-download-http
[18715a85]8 "https://archive.apache.org/dist/httpd/httpd-&apache-version;.tar.bz2">
[4890200]9 <!ENTITY apache-download-ftp " ">
[e9cab664]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">
[08254fc]14]>
15
[7c7fa7d]16<sect1 id="apache" xreflabel="Apache-&apache-version;">
[ab3a3af7]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">
[efe28817]31 <title>Introduction to Apache HTTPD</title>
[ab3a3af7]32
[6041710]33 <para>
[efe28817]34 The <application>Apache HTTPD</application> package contains an open-source HTTP
[6041710]35 server. It is useful for creating local intranet web sites or running huge
36 web serving operations.
37 </para>
[ab3a3af7]38
[33c6126]39 &lfs80_checked;
[20e6cade]40
[ab3a3af7]41 <bridgehead renderas="sect3">Package Information</bridgehead>
42 <itemizedlist spacing="compact">
43 <listitem>
[6041710]44 <para>
45 Download (HTTP): <ulink url="&apache-download-http;"/>
46 </para>
[ab3a3af7]47 </listitem>
48 <listitem>
[6041710]49 <para>
50 Download (FTP): <ulink url="&apache-download-ftp;"/>
51 </para>
[ab3a3af7]52 </listitem>
53 <listitem>
[6041710]54 <para>
55 Download MD5 sum: &apache-md5sum;
56 </para>
[ab3a3af7]57 </listitem>
58 <listitem>
[6041710]59 <para>
60 Download size: &apache-size;
61 </para>
[ab3a3af7]62 </listitem>
63 <listitem>
[6041710]64 <para>
65 Estimated disk space required: &apache-buildsize;
66 </para>
[ab3a3af7]67 </listitem>
68 <listitem>
[6041710]69 <para>
70 Estimated build time: &apache-time;
71 </para>
[3ae60ba7]72 </listitem>
[ab3a3af7]73 </itemizedlist>
74
[efe28817]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>
[ab3a3af7]86
[6041710]87 <bridgehead renderas="sect4">Required</bridgehead>
88 <para role="required">
[4049347a]89 <xref linkend="apr-util"/> and
90 <xref linkend="pcre"/>
[6041710]91 </para>
[3cb0c57]92
[efe28817]93 <bridgehead renderas="sect4">Recommended</bridgehead>
94 <para role="recommended">
95 <xref linkend="openssl"/>
96 </para>
97
[6041710]98 <bridgehead renderas="sect4">Optional</bridgehead>
99 <para role="optional">
[0d7900a]100 <xref linkend="db"/>,
[efe28817]101 <xref linkend="doxygen"/>,
[fd69a62]102 <xref linkend="libxml2"/>,
[c41d6d5]103 <xref linkend="lynx"/> or
104 <xref linkend="Links"/> or
105 <ulink url="http://elinks.or.cz/">ELinks</ulink>,
[0c702b61]106 <xref linkend="nghttp2"/>,
[fd69a62]107 <xref linkend="openldap"/> (<xref linkend="apr-util"/> needs to be
108 installed with ldap suport),
[6041710]109 <xref linkend="rsync"/>,
[3e30e1b]110 <ulink url="https://sourceforge.net/projects/distcache">Distcache</ulink>, and
[32d4980]111 <xref linkend="lua"/>
[6041710]112 </para>
113
114 <para condition="html" role="usernotes">
115 User Notes: <ulink url="&blfs-wiki;/apache"/>
116 </para>
[ab3a3af7]117 </sect2>
118
119 <sect2 role="installation">
[efe28817]120 <title>Installation of Apache HTTPD</title>
[ab3a3af7]121
[6041710]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>
[ab3a3af7]127
[b785ab29]128<screen role="root"><userinput>groupadd -g 25 apache &amp;&amp;
[efe28817]129useradd -c "Apache Server" -d /srv/www -g apache \
[b785ab29]130 -s /bin/false -u 25 apache</userinput></screen>
[ab3a3af7]131
[6041710]132 <para>
[efe28817]133 Build and install <application>Apache HTTPD</application> by running the
[6041710]134 following commands:
135 </para>
136
[a4f37269]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;
[ab3a3af7]155make</userinput></screen>
156
[6041710]157 <para>
158 This package does not come with a test suite.
159 </para>
[ab3a3af7]160
[6041710]161 <para>
[3add494]162 Now, as the <systemitem class="username">root</systemitem> user:
[6041710]163 </para>
[ab3a3af7]164
[3add494]165 <note><para>This package does not install properly using DESTDIR
166 techniques as an unpriviledged user.</para></note>
167
[a4f37269]168<screen role="root"><userinput>make install &amp;&amp;
[63aeb2c]169
[efe28817]170mv -v /usr/sbin/suexec /usr/lib/httpd/suexec &amp;&amp;
[0a2b9de8]171chgrp apache /usr/lib/httpd/suexec &amp;&amp;
172chmod 4754 /usr/lib/httpd/suexec &amp;&amp;
[63aeb2c]173
[f165eea]174chown -v -R apache:apache /srv/www</userinput></screen>
[08254fc]175
[ab3a3af7]176 </sect2>
[08254fc]177
[ab3a3af7]178 <sect2 role="commands">
179 <title>Command Explanations</title>
[08254fc]180
[68c04ad]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
[14dc4b73]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
[6041710]193 <para>
[efe28817]194 <parameter>--enable-mods-shared="all cgi"</parameter>: The modules should be
[6041710]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>
[f7841987]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.
[efe28817]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
[0a2b9de8]224 permissions of the binary, making it setgid
[efe28817]225 <systemitem class="username">apache</systemitem>.
[6041710]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>
[efe28817]238
[ab3a3af7]239 </sect2>
[08254fc]240
[ab3a3af7]241 <sect2 role="configuration">
242 <title>Configuring Apache</title>
[08254fc]243
[ab3a3af7]244 <sect3 id="apache-config">
245 <title>Config Files</title>
[08254fc]246
[6041710]247 <para>
[efe28817]248 <filename>/etc/httpd/httpd.conf</filename> and
249 <filename>/etc/httpd/extra/*</filename>
[6041710]250 </para>
[08254fc]251
[ab3a3af7]252 <indexterm zone="apache apache-config">
[efe28817]253 <primary sortas="e-etc-httpd-httpd.conf">/etc/httpd/httpd.conf</primary>
[ab3a3af7]254 </indexterm>
[08254fc]255
[ab3a3af7]256 <indexterm zone="apache apache-config">
[efe28817]257 <primary sortas="e-etc-httpd-extra-star">/etc/httpd/extra/*</primary>
[ab3a3af7]258 </indexterm>
[efe28817]259
[ab3a3af7]260 </sect3>
261
262 <sect3>
263 <title>Configuration Information</title>
264
[6041710]265 <para>
[a1083b4]266 See <ulink url="file:///usr/share/httpd/manual/configuring.html"/>
[6041710]267 for detailed instructions on customising your
268 <application>Apache</application> HTTP server configuration file.
269 </para>
[efe28817]270
[ab3a3af7]271 </sect3>
272
[f856738]273 <sect3 id="httpd-init">
[1258125]274 <title><phrase revision="sysv">Boot Script</phrase>
275 <phrase revision="systemd">Systemd Unit</phrase></title>
[ab3a3af7]276
[6041710]277 <para>
278 If you want the <application>Apache</application> server to
[efe28817]279 start automatically when the system is booted, install the
[1258125]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"/>
[3c7bd00]285 <xref linkend="systemd-units" revision="systemd"/> package.
[efe28817]286 </para>
[ab3a3af7]287
[f856738]288 <indexterm zone="apache httpd-init">
[ab3a3af7]289 <primary sortas="f-apache">apache</primary>
290 </indexterm>
291
[f856738]292<screen role="root"><userinput>make install-httpd</userinput></screen>
[4890200]293
[ab3a3af7]294 </sect3>
[4890200]295
[ab3a3af7]296 </sect2>
297
298 <sect2 role="content">
299 <title>Contents</title>
300
301 <segmentedlist>
302 <segtitle>Installed Programs</segtitle>
[c3c56b2]303 <segtitle>Installed Libraries</segtitle>
[ab3a3af7]304 <segtitle>Installed Directories</segtitle>
305
306 <seglistitem>
[6041710]307 <seg>
[0a2b9de8]308 ab, apachectl, apxs, checkgid, dbmmanage, fcgistarter,
309 htcacheclean, htdbm, htdigest, htpasswd, httpd,
[fd69a62]310 httxt2dbm, logresolve, rotatelogs, and suexec
[6041710]311 </seg>
[c3c56b2]312 <seg>
[fd69a62]313 Several libraries under /usr/lib/httpd/modules/
[c3c56b2]314 </seg>
[6041710]315 <seg>
[efe28817]316 /etc/httpd,
317 /srv/www,
318 /usr/include/httpd,
319 /usr/lib/httpd,
[fd69a62]320 /usr/share/httpd,
[0a2b9de8]321 /var/log/httpd, and
[efe28817]322 /var/run/httpd
[6041710]323 </seg>
[ab3a3af7]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>
[6041710]335 <para>
336 is a tool for benchmarking your <application>Apache</application>
337 HTTP server.
338 </para>
[ab3a3af7]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>
[6041710]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>
[ab3a3af7]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>
[6041710]362 <para>
363 is a tool for building and installing extension modules for the
364 <application>Apache</application> HTTP server.
365 </para>
[ab3a3af7]366 <indexterm zone="apache apxs">
367 <primary sortas="b-apxs">apxs</primary>
368 </indexterm>
369 </listitem>
370 </varlistentry>
371
[8961d128]372 <varlistentry id="checkgid">
373 <term><command>checkgid</command></term>
374 <listitem>
[6041710]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>
[8961d128]381 <indexterm zone="apache checkgid">
382 <primary sortas="b-checkgid">checkgid</primary>
383 </indexterm>
384 </listitem>
385 </varlistentry>
386
[de2551f]387 <varlistentry id="dbmmanage">
388 <term><command>dbmmanage</command></term>
[ab3a3af7]389 <listitem>
[6041710]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>
[de2551f]394 <indexterm zone="apache dbmmanage">
395 <primary sortas="b-dbmmanage">dbmmanage</primary>
[ab3a3af7]396 </indexterm>
397 </listitem>
398 </varlistentry>
399
[28370fe]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
[8961d128]412 <varlistentry id="htcacheclean">
413 <term><command>htcacheclean</command></term>
414 <listitem>
[6041710]415 <para>
416 is used to clean up the disk cache.
417 </para>
[8961d128]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>
[6041710]427 <para>
428 is used to manipulate the DBM password databases.
429 </para>
[8961d128]430 <indexterm zone="apache htdbm">
431 <primary sortas="b-htdbm">htdbm</primary>
432 </indexterm>
433 </listitem>
434 </varlistentry>
435
[ab3a3af7]436 <varlistentry id="htdigest">
437 <term><command>htdigest</command></term>
438 <listitem>
[6041710]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>
[ab3a3af7]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>
[6041710]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>
[ab3a3af7]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>
[6041710]465 <para>
466 is the <application>Apache</application> HTTP server program.
467 </para>
[ab3a3af7]468 <indexterm zone="apache httpd">
469 <primary sortas="b-httpd">httpd</primary>
470 </indexterm>
471 </listitem>
472 </varlistentry>
473
[8961d128]474 <varlistentry id="httxt2dbm">
475 <term><command>httxt2dbm</command></term>
[ab3a3af7]476 <listitem>
[6041710]477 <para>
478 is used to generate DBM files from text, for use in RewriteMap.
479 </para>
[8961d128]480 <indexterm zone="apache httxt2dbm">
481 <primary sortas="b-httxt2dbm">httxt2dbm</primary>
[ab3a3af7]482 </indexterm>
483 </listitem>
484 </varlistentry>
485
486 <varlistentry id="logresolve">
487 <term><command>logresolve</command></term>
488 <listitem>
[6041710]489 <para>
490 is a post-processing program to resolve IP-addresses in
491 <application>Apache</application>'s access log files.
492 </para>
[ab3a3af7]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>
[6041710]502 <para>
503 is a simple program for use in conjunction with
504 <application>Apache</application>'s piped log file feature.
505 </para>
[ab3a3af7]506 <indexterm zone="apache rotatelogs">
507 <primary sortas="b-rotatelogs">rotatelogs</primary>
508 </indexterm>
509 </listitem>
510 </varlistentry>
[efe28817]511
[28370fe]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
[ab3a3af7]524 </variablelist>
[efe28817]525
[ab3a3af7]526 </sect2>
[efe28817]527
[f45b1953]528</sect1>
Note: See TracBrowser for help on using the repository browser.