source: server/major/apache.xml@ 084ee37

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 084ee37 was 084ee37, checked in by Wayne Blaszczyk <wblaszcz@…>, 12 years ago

Corrected a md5sum in Apache-2.2.21.

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

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