source: server/major/apache.xml@ afe66bc3

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 afe66bc3 was afe66bc3, checked in by Randy McMurchy <randy@…>, 13 years ago

Added an optional parameter in the 'Command Explanations' section of the Apache HTTPD instructions to use the internal APR if necessary

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

  • Property mode set to 100644
File size: 20.9 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 "16eadc59ea6b38af33874d300973202e">
11 <!ENTITY apache-size "4.9 MB">
12 <!ENTITY apache-buildsize "102 MB (building all available DSO modules)">
13 <!ENTITY apache-time "2.1 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 <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>
65 <listitem>
66 <para>Required patch: <ulink
67 url="&patch-root;/httpd-&apache-version;-bdb51-1.patch"/></para>
68 </listitem>
69 </itemizedlist>
70
71 <bridgehead renderas="sect3">Apache Dependencies</bridgehead>
72
73 <bridgehead renderas="sect4">Optional</bridgehead>
74 <para role="optional"><xref linkend="openldap"/>,
75 <xref linkend="openssl"/> (also used in the bundled APR-util),
76 <xref linkend="pcre"/>,
77 <xref linkend="rsync"/>,
78 <xref linkend="lynx"/>,
79 <ulink url="http://apr.apache.org/">APR</ulink>,
80 <ulink url="http://apr.apache.org/">APR-util</ulink>, and
81 <ulink url="http://www.distcache.org/">distcache</ulink></para>
82
83 <bridgehead renderas="sect4">Optional (Only if Using the Bundled
84 APR-util)</bridgehead>
85 <para role="optional"><!-- <xref linkend="pkgconfig"/>, -->
86 <xref linkend="expat"/>,
87 <!-- <xref linkend="gdbm"/>, -->
88 <xref linkend="db"/>,
89 <xref linkend="unixodbc"/>,
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>
95
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
100 <para condition="html" role="usernotes">User Notes:
101 <ulink url="&blfs-wiki;/apache"/></para>
102
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
110 following commands
111 (as <systemitem class="username">root</systemitem>):</para>
112
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>
116
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
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.
122 See the User Notes for details for specific applications.</para></note>
123
124 <para>The following patch modifies the layout of destination
125 directories and among them, the build directory at
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
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
136 the modules required for your installation. There are as many as 65
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>
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>
149
150 <para>While it is not built by default when using the following commands,
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
154 <emphasis>only</emphasis> supported and functional in Win32
155 environments.</para>
156 </note>
157
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
179 <para>Build and install <application>Apache</application> by running the
180 following commands:</para>
181
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 \
188 --enable-mods-shared=all \
189 --enable-so &amp;&amp;
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;
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 \
201 /usr/share/man/man8/{logresolve,rotatelogs,suexec}.8 &amp;&amp;
202chown -v -R apache:apache /srv/www</userinput></screen>
203
204 </sect2>
205
206 <sect2 role="commands">
207 <title>Command Explanations</title>
208
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>
212
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>
217
218 <para><option>--enable-ssl</option>: Use this parameter
219 to create the <filename class="libraryfile">mod_ssl</filename>
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
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>
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
233 <option>--enable-ldap</option> options to <command>configure</command>
234 and enabled the <application>OpenLDAP</application> modules.</para>
235
236 <para><option>--with-dbm=db4 --with-berkeley-db</option>: Use these
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
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>
246
247 <para><option>--with-included-apr</option>: Add this parameter to use the
248 bundled version of the APR system. The default is to use a
249 system-installed version, if one if available. Use this parameter to force
250 the build to use and then install (overwriting the existing APR) the
251 internal (bundled) copy of the APR.</para>
252
253 <para><command>chown root:root ...</command>: This command changes the
254 ownership of some installed files, the result of building the package as
255 a user other than <systemitem class="username">root</systemitem>.</para>
256
257 <para><command>chown -R apache:apache /srv/www</command>: By default, the
258 installation process installs files (documentation, error messages, default
259 icons, etc.) with the ownership of the user that extracted the files from
260 the tar file. If you want to change the ownership to another user, you
261 should do so at this point. The only requirement is that the document
262 directories need to be accessible by the <command>httpd</command> process
263 with (r-x) permissions and files need to be readable (r--) by the
264 <systemitem class="username">apache</systemitem> user.</para>
265
266 </sect2>
267
268 <sect2 role="configuration">
269 <title>Configuring Apache</title>
270
271 <sect3 id="apache-config">
272 <title>Config Files</title>
273
274 <para><filename>/etc/apache/*</filename></para>
275
276 <indexterm zone="apache apache-config">
277 <primary sortas="e-etc-apache">/etc/apache/*</primary>
278 </indexterm>
279
280 <indexterm zone="apache apache-config">
281 <primary sortas="e-etc-apache-httpd.conf">/etc/apache/httpd.conf</primary>
282 </indexterm>
283
284 </sect3>
285
286 <sect3>
287 <title>Configuration Information</title>
288
289 <para>The main configuration file is named
290 <filename>/etc/apache/httpd.conf</filename>. Modify it so that the HTTP
291 server runs as the dedicated user and group:</para>
292
293<screen role="root"><userinput>sed -i -e "s/User daemon/User apache/" \
294 -e "s/Group daemon/Group apache/" \
295 /etc/apache/httpd.conf</userinput></screen>
296
297 <para>See <ulink url="http://httpd.apache.org/docs-2.2/configuring.html"/>
298 for detailed instructions on customizing your
299 <application>Apache</application> HTTP server configuration file.</para>
300
301 </sect3>
302
303 <sect3 id="apache-init">
304 <title>Boot Script</title>
305
306 <para>If you want the <application>Apache</application> server to
307 start automatically when the system is booted, install the
308 <filename>/etc/rc.d/init.d/apache</filename> init script included
309 in the <xref linkend="bootscripts"/> package.</para>
310
311 <indexterm zone="apache apache-init">
312 <primary sortas="f-apache">apache</primary>
313 </indexterm>
314
315<screen role="root"><userinput>make install-apache</userinput></screen>
316
317 </sect3>
318
319 </sect2>
320
321 <sect2 role="content">
322 <title>Contents</title>
323
324 <segmentedlist>
325 <segtitle>Installed Programs</segtitle>
326 <segtitle>Installed Libraries</segtitle>
327 <segtitle>Installed Directories</segtitle>
328
329 <seglistitem>
330 <seg>ab, apachectl, apr-1-config, apu-1-config, apxs, checkgid,
331 dbmmanage, htcacheclean, htdbm, htdigest, htpasswd, httpd, httxt2dbm,
332 logresolve, rotatelogs, and suexec</seg>
333 <seg>libapr-1.{so,a}, libaprutil-1.{so,a}, apr_{dbd,ldap} database
334 modules, and numerous DSO modules</seg>
335 <seg>/etc/apache, /srv/www, /usr/include/apache, /usr/lib/apache,
336 /usr/lib/apr-util-1, and /var/log/apache</seg>
337 </seglistitem>
338 </segmentedlist>
339
340 <variablelist>
341 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
342 <?dbfo list-presentation="list"?>
343 <?dbhtml list-presentation="table"?>
344
345 <varlistentry id="ab">
346 <term><command>ab</command></term>
347 <listitem>
348 <para>is a tool for benchmarking your
349 <application>Apache</application> HTTP server.</para>
350 <indexterm zone="apache ab">
351 <primary sortas="b-ab">ab</primary>
352 </indexterm>
353 </listitem>
354 </varlistentry>
355
356 <varlistentry id="apachectl">
357 <term><command>apachectl</command></term>
358 <listitem>
359 <para>is a front end to the <application>Apache</application>
360 HTTP server which is designed to help the administrator
361 control the functioning of the <application>Apache</application>
362 httpd daemon.</para>
363 <indexterm zone="apache apachectl">
364 <primary sortas="b-apachectl">apachectl</primary>
365 </indexterm>
366 </listitem>
367 </varlistentry>
368
369 <varlistentry id="apr-1-config">
370 <term><command>apr-1-config</command></term>
371 <listitem>
372 <para>is a simple script that provides information about the
373 installed APR program.</para>
374 <indexterm zone="apache apr-1-config">
375 <primary sortas="b-apr-1-config">apr-1-config</primary>
376 </indexterm>
377 </listitem>
378 </varlistentry>
379
380 <varlistentry id="apu-1-config">
381 <term><command>apu-1-config</command></term>
382 <listitem>
383 <para>is a simple script that provides information about the
384 installed APR-Util program.</para>
385 <indexterm zone="apache apu-1-config">
386 <primary sortas="b-apu-1-config">apu-1-config</primary>
387 </indexterm>
388 </listitem>
389 </varlistentry>
390
391 <varlistentry id="apxs">
392 <term><command>apxs</command></term>
393 <listitem>
394 <para>is a tool for building and installing extension modules for
395 the <application>Apache</application> HTTP server.</para>
396 <indexterm zone="apache apxs">
397 <primary sortas="b-apxs">apxs</primary>
398 </indexterm>
399 </listitem>
400 </varlistentry>
401
402 <varlistentry id="checkgid">
403 <term><command>checkgid</command></term>
404 <listitem>
405 <para>is a program that checks whether it can setgid to the group
406 specified. This is to see if it is a valid group for Apache2 to use
407 at runtime. If the user (should be run as superuser) is in that
408 group, or can setgid to it, it will return 0.</para>
409 <indexterm zone="apache checkgid">
410 <primary sortas="b-checkgid">checkgid</primary>
411 </indexterm>
412 </listitem>
413 </varlistentry>
414
415 <varlistentry id="dbmmanage">
416 <term><command>dbmmanage</command></term>
417 <listitem>
418 <para>is used to create and update the DBM format files used to store
419 usernames and passwords for basic authentication of HTTP users.</para>
420 <indexterm zone="apache dbmmanage">
421 <primary sortas="b-dbmmanage">dbmmanage</primary>
422 </indexterm>
423 </listitem>
424 </varlistentry>
425
426 <varlistentry id="htcacheclean">
427 <term><command>htcacheclean</command></term>
428 <listitem>
429 <para>is used to clean up the disk cache.</para>
430 <indexterm zone="apache htcacheclean">
431 <primary sortas="b-htcacheclean">htcacheclean</primary>
432 </indexterm>
433 </listitem>
434 </varlistentry>
435
436 <varlistentry id="htdbm">
437 <term><command>htdbm</command></term>
438 <listitem>
439 <para>is used to manipulate the DBM password databases.</para>
440 <indexterm zone="apache htdbm">
441 <primary sortas="b-htdbm">htdbm</primary>
442 </indexterm>
443 </listitem>
444 </varlistentry>
445
446 <varlistentry id="htdigest">
447 <term><command>htdigest</command></term>
448 <listitem>
449 <para>is used to create and update the flat-files used to store
450 usernames, realms and passwords for digest authentication of
451 HTTP users.</para>
452 <indexterm zone="apache htdigest">
453 <primary sortas="b-htdigest">htdigest</primary>
454 </indexterm>
455 </listitem>
456 </varlistentry>
457
458 <varlistentry id="htpasswd">
459 <term><command>htpasswd</command></term>
460 <listitem>
461 <para>is used to create and update the flat-files used to store
462 usernames and passwords for basic authentication of HTTP users.</para>
463 <indexterm zone="apache htpasswd">
464 <primary sortas="b-htpasswd">htpasswd</primary>
465 </indexterm>
466 </listitem>
467 </varlistentry>
468
469 <varlistentry id="httpd">
470 <term><command>httpd</command></term>
471 <listitem>
472 <para>is the <application>Apache</application>
473 HTTP server program.</para>
474 <indexterm zone="apache httpd">
475 <primary sortas="b-httpd">httpd</primary>
476 </indexterm>
477 </listitem>
478 </varlistentry>
479
480 <varlistentry id="httxt2dbm">
481 <term><command>httxt2dbm</command></term>
482 <listitem>
483 <para>is used to generate DBM files from text input, for use in
484 RewriteMap.</para>
485 <indexterm zone="apache httxt2dbm">
486 <primary sortas="b-httxt2dbm">httxt2dbm</primary>
487 </indexterm>
488 </listitem>
489 </varlistentry>
490
491 <varlistentry id="logresolve">
492 <term><command>logresolve</command></term>
493 <listitem>
494 <para>is a post-processing program to resolve IP-addresses
495 in <application>Apache</application>'s access log files.</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>is a simple program for use in conjunction with
506 <application>Apache</application>'s piped log file feature.</para>
507 <indexterm zone="apache rotatelogs">
508 <primary sortas="b-rotatelogs">rotatelogs</primary>
509 </indexterm>
510 </listitem>
511 </varlistentry>
512
513 <varlistentry id="suexec">
514 <term><command>suexec</command></term>
515 <listitem>
516 <para>is used by the <application>Apache HTTP</application> Server
517 to switch to another user before executing CGI programs.</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.