source: server/major/apache.xml@ 8961d128

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 7.10 7.4 7.5 7.6 7.6-blfs 7.6-systemd 7.7 7.8 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind gnome kde5-13430 kde5-14269 kde5-14686 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts krejzi/svn lazarus lxqt nosym perl-modules plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition systemd-11177 systemd-13485 trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 8961d128 was 8961d128, checked in by Randy McMurchy <randy@…>, 14 years ago

Updated to Apache HTTPD-2.2.17

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

  • Property mode set to 100644
File size: 20.6 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
[1e642794]7 <!-- <!ENTITY apache-download-http "http://www.apache.org/dist/httpd/httpd-&apache-version;.tar.bz2"> -->
[3c1f587]8 <!ENTITY apache-download-http "http://archive.apache.org/dist/httpd/httpd-&apache-version;.tar.bz2">
[1e642794]9 <!ENTITY apache-download-ftp "ftp://apache.mirrors.pair.com/httpd/httpd-&apache-version;.tar.bz2">
[8961d128]10 <!ENTITY apache-md5sum "16eadc59ea6b38af33874d300973202e">
[265dc9fb]11 <!ENTITY apache-size "4.9 MB">
[8961d128]12 <!ENTITY apache-buildsize "102 MB (building all available DSO modules)">
13 <!ENTITY apache-time "2.1 SBU (building all available DSO modules)">
[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">
31 <title>Introduction to Apache</title>
32
33 <para>The <application>Apache</application> package contains an
34 open-source HTTP server. It is useful for creating local intranet
35 web sites or running huge web serving operations.</para>
36
37 <bridgehead renderas="sect3">Package Information</bridgehead>
38 <itemizedlist spacing="compact">
39 <listitem>
40 <para>Download (HTTP): <ulink url="&apache-download-http;"/></para>
41 </listitem>
42 <listitem>
43 <para>Download (FTP): <ulink url="&apache-download-ftp;"/></para>
44 </listitem>
45 <listitem>
46 <para>Download MD5 sum: &apache-md5sum;</para>
47 </listitem>
48 <listitem>
49 <para>Download size: &apache-size;</para>
50 </listitem>
51 <listitem>
52 <para>Estimated disk space required: &apache-buildsize;</para>
53 </listitem>
54 <listitem>
55 <para>Estimated build time: &apache-time;</para>
56 </listitem>
57 </itemizedlist>
58
59 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
60 <itemizedlist spacing='compact'>
61 <listitem>
62 <para>Required patch: <ulink
63 url="&patch-root;/httpd-&apache-version;-config-1.patch"/></para>
64 </listitem>
[8961d128]65 <listitem>
66 <para>Required patch: <ulink
67 url="&patch-root;/httpd-&apache-version;-bdb51-1.patch"/></para>
68 </listitem>
[ab3a3af7]69 </itemizedlist>
70
71 <bridgehead renderas="sect3">Apache Dependencies</bridgehead>
72
73 <bridgehead renderas="sect4">Optional</bridgehead>
[2122007]74 <para role="optional"><xref linkend="openldap"/>,
[8961d128]75 <xref linkend="openssl"/> (also used in the bundled APR-util),
[1259e0e8]76 <xref linkend="pcre"/>,
[2122007]77 <xref linkend="rsync"/>,
78 <xref linkend="lynx"/>,
[c6dc484]79 <ulink url="http://apr.apache.org/">APR</ulink>,
80 <ulink url="http://apr.apache.org/">APR-util</ulink>, and
[1259e0e8]81 <ulink url="http://www.distcache.org/">distcache</ulink></para>
[ab3a3af7]82
[870a50d]83 <bridgehead renderas="sect4">Optional (Only if Using the Bundled
84 APR-util)</bridgehead>
[358241d1]85 <para role="optional"><!-- <xref linkend="pkgconfig"/>, -->
[870a50d]86 <xref linkend="expat"/>,
[7bff1b2]87 <!-- <xref linkend="gdbm"/>, -->
[2122007]88 <xref linkend="db"/>,
89 <xref linkend="unixodbc"/>,
[8961d128]90 <xref linkend="mysql"/>,
91 <xref linkend="postgresql"/>,
92 <xref linkend="sqlite"/>,
93 <ulink url="http://www.oracle.com/us/products/database/index.html">Oracle 11g</ulink>, and
94 <ulink url="http://www.freetds.org/">FreeTDS</ulink></para>
[870a50d]95
[c6dc484]96 <para>Though you can install APR and APR-util as separate components,
97 it is recommended to use the bundled versions that come with the Apache
98 HTTPD tarball.</para>
99
[3cb0c57]100 <para condition="html" role="usernotes">User Notes:
101 <ulink url="&blfs-wiki;/apache"/></para>
102
[ab3a3af7]103 </sect2>
104
105 <sect2 role="installation">
106 <title>Installation of Apache</title>
107
108 <para>For security reasons, running the server as an unprivileged user and
109 group is strongly encouraged. Create the following group and user using the
[1259e0e8]110 following commands
111 (as <systemitem class="username">root</systemitem>):</para>
[ab3a3af7]112
[b785ab29]113<screen role="root"><userinput>groupadd -g 25 apache &amp;&amp;
114useradd -c "Apache Server" -d /dev/null -g apache \
115 -s /bin/false -u 25 apache</userinput></screen>
[ab3a3af7]116
[9196f196]117 <note><para>The above command directs the <application>Apache</application>
118 user's home directory to <filename>/dev/null</filename>. This may not work
[608a225]119 for some add-ons such as <ulink
120 url='http://www.viewvc.org/'><application>ViewVC</application></ulink>, a
121 browser interface for CVS and Subversion version control repositories.
[9f12e36]122 See the User Notes for details for specific applications.</para></note>
[9196f196]123
[1259e0e8]124 <para>The following patch modifies the layout of destination
125 directories and among them, the build directory at
[ab3a3af7]126 <filename class="directory">/usr/lib/apache/build</filename>. This
127 will allow the modules added to <application>Apache</application>
128 to be configured without errors. Apply the patch:</para>
129
130<screen><userinput>patch -Np1 -i ../httpd-&apache-version;-config-1.patch</userinput></screen>
131
[f165eea]132 <note>
133 <para>You may wish to review the output from
134 <command>./configure --help</command> and include whatever parameters
135 are necessary to the <command>configure</command> command below to build
[8961d128]136 the modules required for your installation. There are as many as 65
[1259e0e8]137 additional parameters you can add to the <command>configure</command>
138 command to build additional modules. Some of the extra parameters which
139 aren't described or mentioned in the <parameter>--help</parameter>
140 information are listed in the <quote>Command Explanations</quote> section
141 below.</para>
[870a50d]142
143 <para>If you are using the bundled version of
144 <application>APR-util</application> and you are going to install
145 <application>Subversion</application> with
146 <application>Berkeley DB</application> back-end support, ensure you use
147 the parameters shown in the <quote>Command Explanations</quote> section
148 below.</para>
[265dc9fb]149
150 <para>While it is not built by default when using the following commands,
[8961d128]151 the ISAPI DSO module can be created by adding the
152 <option>--enable-isapi</option> option. Even though the module will
153 compile, install and load fine, the module is
[265dc9fb]154 <emphasis>only</emphasis> supported and functional in Win32
155 environments.</para>
[f165eea]156 </note>
157
[8961d128]158 <note>
159 <para>You may see warnings and other information similar to the output
160 shown below while running the <command>autoconf</command> program in the
161 following instructions:</para>
162<screen><computeroutput>configure.in:152: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
163../../lib/autoconf/lang.m4:194: AC_LANG_CONFTEST is expanded from...
164../../lib/autoconf/general.m4:2591: _AC_COMPILE_IFELSE is expanded from...
165../../lib/autoconf/general.m4:2607: AC_COMPILE_IFELSE is expanded from...
166build/apr_common.m4:491: APR_TRY_COMPILE_NO_WARNING is expanded from...
167build/apu-conf.m4:215: APU_FIND_LDAP is expanded from...
168configure.in:152: the top level
169configure.in:162: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
170../../lib/autoconf/lang.m4:194: AC_LANG_CONFTEST is expanded from...
171../../lib/autoconf/general.m4:2591: _AC_COMPILE_IFELSE is expanded from...
172../../lib/autoconf/general.m4:2607: AC_COMPILE_IFELSE is expanded from...
173build/apr_common.m4:491: APR_TRY_COMPILE_NO_WARNING is expanded from...
174build/apu-iconv.m4:115: APU_CHECK_ICONV_INBUF is expanded from...
175build/apu-iconv.m4:34: APU_FIND_ICONV is expanded from...
176configure.in:162: the top level</computeroutput></screen>
177 </note>
178
[ab3a3af7]179 <para>Build and install <application>Apache</application> by running the
180 following commands:</para>
181
[8961d128]182<screen><userinput>patch -Np1 -i ../httpd-&apache-version;-bdb51-1.patch &amp;&amp;
183pushd srclib/apr-util &amp;&amp;
184autoconf &amp;&amp;
185popd &amp;&amp;
186
187./configure --enable-layout=FHS \
[2122007]188 --enable-mods-shared=all \
189 --enable-so &amp;&amp;
[ab3a3af7]190make</userinput></screen>
191
192 <para>This package does not come with a test suite.</para>
193
194 <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
195
196<screen role="root"><userinput>make install &amp;&amp;
[1259e0e8]197chown -v root:root /usr/lib/apache/httpd.exp \
198 /usr/sbin/{apxs,apachectl,dbmmanage,envvars{,-std}} \
199 /usr/share/man/man1/{dbmmanage,ht{dbm,digest,passwd}}.1 \
200 /usr/share/man/man8/{ab,apachectl,apxs,htcacheclean,httpd}.8 \
[47603ac1]201 /usr/share/man/man8/{logresolve,rotatelogs,suexec}.8 &amp;&amp;
[f165eea]202chown -v -R apache:apache /srv/www</userinput></screen>
[08254fc]203
[ab3a3af7]204 </sect2>
[08254fc]205
[ab3a3af7]206 <sect2 role="commands">
207 <title>Command Explanations</title>
[08254fc]208
[8961d128]209 <para><command>autoconf</command>: This command generates a new
210 <command>configure</command> script required after installing the
211 <filename>bdb</filename> patch.</para>
[b1623c2]212
[ab3a3af7]213 <para><parameter>--enable-mods-shared=all</parameter>: The modules
214 should be compiled and used as Dynamic Shared Objects
215 (DSOs) so they can be included and excluded from the
216 server using the run-time configuration directives.</para>
[08254fc]217
[1259e0e8]218 <para><option>--enable-ssl</option>: Use this parameter
[ab3a3af7]219 to create the <filename class="libraryfile">mod_ssl</filename>
[1259e0e8]220 module and enable SSL support. This parameter is mentioned as one of many
221 parameters which can be passed to the <command>configure</command> command
[8961d128]222 to create additional DSO modules.<!-- Note that it really only affects the
223 APR-Util sub-package, which the HTTPD installation then uses.--></para>
[1259e0e8]224
225 <para><option>--with-pcre</option>: Add this parameter to use the system
226 installed version of the <application>PCRE</application> library.</para>
227
228 <para><option>--with-z</option>: Add this parameter to use the system
229 installed version of the <application>Zlib</application> library.</para>
230
231 <para><option>--with-ldap</option>: This parameter is required if you
232 passed the <option>--enable-authnz-ldap</option> or
[6473e74]233 <option>--enable-ldap</option> options to <command>configure</command>
[1259e0e8]234 and enabled the <application>OpenLDAP</application> modules.</para>
[08254fc]235
[562594ff]236 <para><option>--with-dbm=db4 --with-berkeley-db</option>: Use these
[870a50d]237 parameters if you require <application>Berkeley DB</application> support in
238 the bundled version of <application>APR-util</application> (required for
239 <application>Berkeley DB</application> back-end support in
[8961d128]240 <application>Subversion</application>). If you are using
241 <application>Berkeley DB</application>-5.1, change the first parameter to
242 <option>--with-dbm=db51</option>.</para>
243
244 <para><option>--with-mysql</option>: Add this parameter to use the system
245 installed version of <application>MySQL</application>.</para>
[870a50d]246
[ab3a3af7]247 <para><command>chown root:root ...</command>: This command changes the
248 ownership of some installed files, the result of building the package as
249 a user other than <systemitem class="username">root</systemitem>.</para>
[4fb9a95]250
[ab3a3af7]251 <para><command>chown -R apache:apache /srv/www</command>: By default, the
252 installation process installs files (documentation, error messages, default
253 icons, etc.) with the ownership of the user that extracted the files from
254 the tar file. If you want to change the ownership to another user, you
255 should do so at this point. The only requirement is that the document
256 directories need to be accessible by the <command>httpd</command> process
257 with (r-x) permissions and files need to be readable (r--) by the
258 <systemitem class="username">apache</systemitem> user.</para>
[4fb9a95]259
[ab3a3af7]260 </sect2>
[08254fc]261
[ab3a3af7]262 <sect2 role="configuration">
263 <title>Configuring Apache</title>
[08254fc]264
[ab3a3af7]265 <sect3 id="apache-config">
266 <title>Config Files</title>
[08254fc]267
[ab3a3af7]268 <para><filename>/etc/apache/*</filename></para>
[08254fc]269
[ab3a3af7]270 <indexterm zone="apache apache-config">
271 <primary sortas="e-etc-apache">/etc/apache/*</primary>
272 </indexterm>
[08254fc]273
[ab3a3af7]274 <indexterm zone="apache apache-config">
275 <primary sortas="e-etc-apache-httpd.conf">/etc/apache/httpd.conf</primary>
276 </indexterm>
[08254fc]277
[ab3a3af7]278 </sect3>
279
280 <sect3>
281 <title>Configuration Information</title>
282
[1259e0e8]283 <para>The main configuration file is named
284 <filename>/etc/apache/httpd.conf</filename>. Modify it so that the HTTP
285 server runs as the dedicated user and group:</para>
[ab3a3af7]286
[fb832ac]287<screen role="root"><userinput>sed -i -e "s/User daemon/User apache/" \
[1259e0e8]288 -e "s/Group daemon/Group apache/" \
[ab3a3af7]289 /etc/apache/httpd.conf</userinput></screen>
290
[1259e0e8]291 <para>See <ulink url="http://httpd.apache.org/docs-2.2/configuring.html"/>
[ab3a3af7]292 for detailed instructions on customizing your
[1259e0e8]293 <application>Apache</application> HTTP server configuration file.</para>
[ab3a3af7]294
295 </sect3>
296
297 <sect3 id="apache-init">
298 <title>Boot Script</title>
299
300 <para>If you want the <application>Apache</application> server to
301 start automatically when the system is booted, install the
302 <filename>/etc/rc.d/init.d/apache</filename> init script included
[5254d12]303 in the <xref linkend="bootscripts"/> package.</para>
[ab3a3af7]304
305 <indexterm zone="apache apache-init">
306 <primary sortas="f-apache">apache</primary>
307 </indexterm>
308
309<screen role="root"><userinput>make install-apache</userinput></screen>
310
311 </sect3>
312
313 </sect2>
314
315 <sect2 role="content">
316 <title>Contents</title>
317
318 <segmentedlist>
319 <segtitle>Installed Programs</segtitle>
320 <segtitle>Installed Libraries</segtitle>
321 <segtitle>Installed Directories</segtitle>
322
323 <seglistitem>
[8961d128]324 <seg>ab, apachectl, apr-1-config, apu-1-config, apxs, checkgid,
325 dbmmanage, htcacheclean, htdbm, htdigest, htpasswd, httpd, httxt2dbm,
326 logresolve, rotatelogs, and suexec</seg>
327 <seg>libapr-1.{so,a}, libaprutil-1.{so,a}, apr_{dbd,ldap} database
328 modules, and numerous DSO modules</seg>
329 <seg>/etc/apache, /srv/www, /usr/include/apache, /usr/lib/apache,
330 /usr/lib/apr-util-1, and /var/log/apache</seg>
[ab3a3af7]331 </seglistitem>
332 </segmentedlist>
333
334 <variablelist>
335 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
336 <?dbfo list-presentation="list"?>
337 <?dbhtml list-presentation="table"?>
338
339 <varlistentry id="ab">
340 <term><command>ab</command></term>
341 <listitem>
342 <para>is a tool for benchmarking your
343 <application>Apache</application> HTTP server.</para>
344 <indexterm zone="apache ab">
345 <primary sortas="b-ab">ab</primary>
346 </indexterm>
347 </listitem>
348 </varlistentry>
349
350 <varlistentry id="apachectl">
351 <term><command>apachectl</command></term>
352 <listitem>
353 <para>is a front end to the <application>Apache</application>
354 HTTP server which is designed to help the administrator
355 control the functioning of the <application>Apache</application>
356 httpd daemon.</para>
357 <indexterm zone="apache apachectl">
358 <primary sortas="b-apachectl">apachectl</primary>
359 </indexterm>
360 </listitem>
361 </varlistentry>
362
[8961d128]363 <varlistentry id="apr-1-config">
364 <term><command>apr-1-config</command></term>
365 <listitem>
366 <para>is a simple script that provides information about the
367 installed APR program.</para>
368 <indexterm zone="apache apr-1-config">
369 <primary sortas="b-apr-1-config">apr-1-config</primary>
370 </indexterm>
371 </listitem>
372 </varlistentry>
373
374 <varlistentry id="apu-1-config">
375 <term><command>apu-1-config</command></term>
376 <listitem>
377 <para>is a simple script that provides information about the
378 installed APR-Util program.</para>
379 <indexterm zone="apache apu-1-config">
380 <primary sortas="b-apu-1-config">apu-1-config</primary>
381 </indexterm>
382 </listitem>
383 </varlistentry>
384
[ab3a3af7]385 <varlistentry id="apxs">
386 <term><command>apxs</command></term>
387 <listitem>
388 <para>is a tool for building and installing extension modules for
389 the <application>Apache</application> HTTP server.</para>
390 <indexterm zone="apache apxs">
391 <primary sortas="b-apxs">apxs</primary>
392 </indexterm>
393 </listitem>
394 </varlistentry>
395
[8961d128]396 <varlistentry id="checkgid">
397 <term><command>checkgid</command></term>
398 <listitem>
399 <para>is a program that checks whether it can setgid to the group
400 specified. This is to see if it is a valid group for Apache2 to use
401 at runtime. If the user (should be run as superuser) is in that
402 group, or can setgid to it, it will return 0.</para>
403 <indexterm zone="apache checkgid">
404 <primary sortas="b-checkgid">checkgid</primary>
405 </indexterm>
406 </listitem>
407 </varlistentry>
408
[de2551f]409 <varlistentry id="dbmmanage">
410 <term><command>dbmmanage</command></term>
[ab3a3af7]411 <listitem>
412 <para>is used to create and update the DBM format files used to store
413 usernames and passwords for basic authentication of HTTP users.</para>
[de2551f]414 <indexterm zone="apache dbmmanage">
415 <primary sortas="b-dbmmanage">dbmmanage</primary>
[ab3a3af7]416 </indexterm>
417 </listitem>
418 </varlistentry>
419
[8961d128]420 <varlistentry id="htcacheclean">
421 <term><command>htcacheclean</command></term>
422 <listitem>
423 <para>is used to clean up the disk cache.</para>
424 <indexterm zone="apache htcacheclean">
425 <primary sortas="b-htcacheclean">htcacheclean</primary>
426 </indexterm>
427 </listitem>
428 </varlistentry>
429
430 <varlistentry id="htdbm">
431 <term><command>htdbm</command></term>
432 <listitem>
433 <para>is used to manipulate the DBM password databases.</para>
434 <indexterm zone="apache htdbm">
435 <primary sortas="b-htdbm">htdbm</primary>
436 </indexterm>
437 </listitem>
438 </varlistentry>
439
[ab3a3af7]440 <varlistentry id="htdigest">
441 <term><command>htdigest</command></term>
442 <listitem>
443 <para>is used to create and update the flat-files used to store
444 usernames, realms and passwords for digest authentication of
445 HTTP users.</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>is used to create and update the flat-files used to store
456 usernames and passwords for basic authentication of HTTP users.</para>
457 <indexterm zone="apache htpasswd">
458 <primary sortas="b-htpasswd">htpasswd</primary>
459 </indexterm>
460 </listitem>
461 </varlistentry>
462
463 <varlistentry id="httpd">
464 <term><command>httpd</command></term>
465 <listitem>
466 <para>is the <application>Apache</application>
467 HTTP server program.</para>
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>
[8961d128]477 <para>is used to generate DBM files from text input, for use in
478 RewriteMap.</para>
479 <indexterm zone="apache httxt2dbm">
480 <primary sortas="b-httxt2dbm">httxt2dbm</primary>
[ab3a3af7]481 </indexterm>
482 </listitem>
483 </varlistentry>
484
485 <varlistentry id="logresolve">
486 <term><command>logresolve</command></term>
487 <listitem>
488 <para>is a post-processing program to resolve IP-addresses
489 in <application>Apache</application>'s access log files.</para>
490 <indexterm zone="apache logresolve">
491 <primary sortas="b-logresolve">logresolve</primary>
492 </indexterm>
493 </listitem>
494 </varlistentry>
495
496 <varlistentry id="rotatelogs">
497 <term><command>rotatelogs</command></term>
498 <listitem>
499 <para>is a simple program for use in conjunction with
500 <application>Apache</application>'s piped log file feature.</para>
501 <indexterm zone="apache rotatelogs">
502 <primary sortas="b-rotatelogs">rotatelogs</primary>
503 </indexterm>
504 </listitem>
505 </varlistentry>
506
[8961d128]507 <varlistentry id="suexec">
508 <term><command>suexec</command></term>
509 <listitem>
510 <para>is used by the <application>Apache HTTP</application> Server
511 to switch to another user before executing CGI programs.</para>
512 <indexterm zone="apache suexec">
513 <primary sortas="b-suexec">suexec</primary>
514 </indexterm>
515 </listitem>
516 </varlistentry>
517
[ab3a3af7]518 </variablelist>
519
520 </sect2>
[f45b1953]521
522</sect1>
Note: See TracBrowser for help on using the repository browser.