source: server/major/apache.xml@ d1a0319

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 d1a0319 was d1a0319, checked in by Bruce Dubbs <bdubbs@…>, 12 years ago

Update to apache-2.4.2

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

  • Property mode set to 100644
File size: 15.5 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 "http://archive.apache.org/dist/httpd/httpd-&apache-version;.tar.bz2">
9 <!ENTITY apache-download-ftp
10 "ftp://apache.mirrors.pair.com/httpd/httpd-&apache-version;.tar.bz2">
11 <!ENTITY apache-md5sum "6bb12f726e22656f0ad2baf91f1f8329">
12 <!ENTITY apache-size "3.9 MB">
13 <!ENTITY apache-buildsize "99 MB">
14 <!ENTITY apache-time "0.8 SBU">
15]>
16
17<sect1 id="apache" xreflabel="Apache-&apache-version;">
18 <?dbhtml filename="apache.html"?>
19
20 <sect1info>
21 <othername>$LastChangedBy$</othername>
22 <date>$Date$</date>
23 </sect1info>
24
25 <title>Apache-&apache-version;</title>
26
27 <indexterm zone="apache">
28 <primary sortas="a-Apache">Apache</primary>
29 </indexterm>
30
31 <sect2 role="package">
32 <title>Introduction to Apache</title>
33
34 <para>
35 The <application>Apache</application> package contains an open-source HTTP
36 server. It is useful for creating local intranet web sites or running huge
37 web serving operations.
38 </para>
39
40 &lfs71_checked;
41
42 <bridgehead renderas="sect3">Package Information</bridgehead>
43 <itemizedlist spacing="compact">
44 <listitem>
45 <para>
46 Download (HTTP): <ulink url="&apache-download-http;"/>
47 </para>
48 </listitem>
49 <listitem>
50 <para>
51 Download (FTP): <ulink url="&apache-download-ftp;"/>
52 </para>
53 </listitem>
54 <listitem>
55 <para>
56 Download MD5 sum: &apache-md5sum;
57 </para>
58 </listitem>
59 <listitem>
60 <para>
61 Download size: &apache-size;
62 </para>
63 </listitem>
64 <listitem>
65 <para>
66 Estimated disk space required: &apache-buildsize;
67 </para>
68 </listitem>
69 <listitem>
70 <para>
71 Estimated build time: &apache-time;
72 </para>
73 </listitem>
74 </itemizedlist>
75
76 <bridgehead renderas="sect3">Apache Dependencies</bridgehead>
77
78 <bridgehead renderas="sect4">Required</bridgehead>
79 <para role="required">
80 <xref linkend="apr-util"/>
81 </para>
82
83 <bridgehead renderas="sect4">Optional</bridgehead>
84 <para role="optional">
85 <xref linkend="openldap"/>,
86 <xref linkend="db"/>,
87 <xref linkend="expat"/>,
88 <xref linkend="openssl"/>,
89 <xref linkend="pcre"/>,
90 <xref linkend="rsync"/>,
91 <xref linkend="doxygen"/>,
92 <xref linkend="lynx"/> and
93 <ulink url="http://www.distcache.org/">distcache</ulink>
94 </para>
95
96 <para condition="html" role="usernotes">
97 User Notes: <ulink url="&blfs-wiki;/apache"/>
98 </para>
99 </sect2>
100
101 <sect2 role="installation">
102 <title>Installation of Apache</title>
103
104 <para>
105 For security reasons, running the server as an unprivileged user and group
106 is strongly encouraged. Create the following group and user using the
107 following commands as <systemitem class="username">root</systemitem>:
108 </para>
109
110<screen role="root"><userinput>groupadd -g 25 apache &amp;&amp;
111useradd -c "Apache Server" -d /dev/null -g apache \
112 -s /bin/false -u 25 apache</userinput></screen>
113
114 <note>
115 <para>
116 The above command directs the <application>Apache</application> user's
117 home directory to <filename>/dev/null</filename>. This may not work
118 for some add-ons such as
119 <ulink url='http://www.viewvc.org/'><application>ViewVC</application></ulink>,
120 a browser interface for CVS and Subversion version control repositories.
121 See the User Notes for details for specific applications.
122 </para>
123 </note>
124
125 <para>
126 Build and install <application>Apache</application> by running the
127 following commands:
128 </para>
129
130<screen><userinput>cat &gt;&gt; config.layout &lt;&lt; "HERE_DOC" &amp;&amp;
131# BLFS FHS layout
132&lt;Layout FHS&gt;
133 prefix: /usr
134 exec_prefix: ${prefix}
135 bindir: ${exec_prefix}/bin
136 sbindir: ${exec_prefix}/sbin
137 libdir: ${exec_prefix}/lib
138 libexecdir: ${exec_prefix}/libexec/apache
139 mandir: ${prefix}/share/man
140 sysconfdir: /etc/apache
141 datadir: /srv/www
142 installbuilddir: ${libexecdir}/build
143 errordir: ${datadir}/error
144 iconsdir: ${datadir}/icons
145 htdocsdir: ${datadir}/htdocs
146 manualdir: ${datadir}/manual
147 cgidir: ${datadir}/cgi-bin
148 includedir: ${prefix}/include/apache
149 localstatedir: ${datadir}
150 runtimedir: /var/run
151 logfiledir: /var/log/apache
152 proxycachedir: /var/cache/apache/proxy
153&lt;/Layout&gt;
154HERE_DOC
155./configure --enable-layout=FHS --enable-mods-shared=all &amp;&amp;
156make</userinput></screen>
157
158 <para>
159 This package does not come with a test suite.
160 </para>
161
162 <para>
163 Now, as the <systemitem class="username">root</systemitem> user:
164 </para>
165
166<screen role="root"><userinput>make install &amp;&amp;
167chown -v root:root /usr/bin/{apxs,dbmmanage} \
168 /usr/sbin/{apachectl,envvars{,-std}} \
169 /usr/libexec/apache/httpd.exp \
170 /usr/share/man/man1/{ab,apxs,dbmmanage,ht{dbm,digest,passwd,txt2dbm},logresolve}.1 \
171 /usr/share/man/man8/{apachectl,htcacheclean,httpd,rotatelogs,suexec}.8 &amp;&amp;
172chown -v -R apache:apache /srv/www</userinput></screen>
173
174 <para>
175 Also as the <systemitem class="username">root</systemitem> user,
176 optionally install the html docs:
177 </para>
178
179<screen role="root"><userinput>mkdir -p /usr/share/doc/httpd-&apache-version;/style &amp;&amp;
180for thing in docs/manual/*.html.en
181do
182 tmp=${thing%.en}
183 cp ${thing} /usr/share/doc/httpd-&apache-version;/${tmp##*/}
184done
185cp -rf docs/manual/images /usr/share/doc/httpd-&apache-version; &amp;&amp;
186cp -rf docs/manual/style/css /usr/share/doc/httpd-&apache-version;/style &amp;&amp;
187for directory in developer faq howto misc mod platform programs rewrite ssl vhosts
188do
189 mkdir -p /usr/share/doc/httpd-&apache-version;/${directory}
190 for thing in docs/manual/${directory}/*.html.en
191 do
192 tmp=${thing%.en}
193 cp ${thing} /usr/share/doc/httpd-&apache-version;/${directory}/${tmp##*/}
194 done
195done
196sed -i \
197 '/developer\|faq\|misc\|mod\|programs\|rewrite\|ssl\|vhosts/s#/"#/index.html"#' \
198 /usr/share/doc/httpd-&apache-version;/index.html</userinput></screen>
199 </sect2>
200
201 <sect2 role="commands">
202 <title>Command Explanations</title>
203
204 <para>
205 <parameter>--enable-mods-shared=all</parameter>: The modules should be
206 compiled and used as Dynamic Shared Objects (DSOs) so they can be included
207 and excluded from the server using the run-time configuration directives.
208 </para>
209
210 <para>
211 <command>chown root:root ...</command>: This command changes the ownership
212 of some installed files, the result of building the package as a user
213 other than <systemitem class="username">root</systemitem>.
214 </para>
215
216 <para>
217 <command>chown -R apache:apache /srv/www</command>: By default, the
218 installation process installs files (documentation, error messages,
219 default icons, etc.) with the ownership of the user that extracted the
220 files from the tar file. If you want to change the ownership to another
221 user, you should do so at this point. The only requirement is that the
222 document directories need to be accessible by the <command>httpd</command>
223 process with (r-x) permissions and files need to be readable (r--) by the
224 <systemitem class="username">apache</systemitem> user.
225 </para>
226 </sect2>
227
228 <sect2 role="configuration">
229 <title>Configuring Apache</title>
230
231 <sect3 id="apache-config">
232 <title>Config Files</title>
233
234 <para>
235 <filename>/etc/apache/*</filename>
236 </para>
237
238 <indexterm zone="apache apache-config">
239 <primary sortas="e-etc-apache">/etc/apache/*</primary>
240 </indexterm>
241
242 <indexterm zone="apache apache-config">
243 <primary sortas="e-etc-apache-httpd.conf">/etc/apache/httpd.conf</primary>
244 </indexterm>
245 </sect3>
246
247 <sect3>
248 <title>Configuration Information</title>
249
250 <para>
251 The main configuration file is named
252 <filename>/etc/apache/httpd.conf</filename>. Modify it so that the HTTP
253 server runs as the dedicated user and group:
254 </para>
255
256<screen role="root"><userinput>sed -i "s/daemon$/apache/" /etc/apache/httpd.conf</userinput></screen>
257
258 <para>
259 See <ulink url="/usr/share/doc/httpd-&apache-version;/configuring.html"/>
260 for detailed instructions on customising your
261 <application>Apache</application> HTTP server configuration file.
262 </para>
263 </sect3>
264
265 <sect3 id="httpd-init">
266 <title>Boot Script</title>
267
268 <para>
269 If you want the <application>Apache</application> server to
270 start automatically when the system is booted, install the
271 <filename>/etc/rc.d/init.d/httpd</filename> init script included
272 in the <xref linkend="bootscripts"/> package.
273 </para>
274
275 <indexterm zone="apache httpd-init">
276 <primary sortas="f-apache">apache</primary>
277 </indexterm>
278
279<screen role="root"><userinput>make install-httpd</userinput></screen>
280 </sect3>
281 </sect2>
282
283 <sect2 role="content">
284 <title>Contents</title>
285
286 <segmentedlist>
287 <segtitle>Installed Programs</segtitle>
288 <segtitle>Installed Directories</segtitle>
289
290 <seglistitem>
291 <seg>
292 ab, apachectl, apxs, checkgid, dbmmanage, htcacheclean, htdbm,
293 htdigest, htpasswd, httpd, httxt2dbm, logresolve and rotatelogs
294 </seg>
295 <seg>
296 /etc/apache, /srv/www, /usr/include/apache, /usr/libexec/apache,
297 and /var/log/apache.
298 </seg>
299 </seglistitem>
300 </segmentedlist>
301
302 <variablelist>
303 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
304 <?dbfo list-presentation="list"?>
305 <?dbhtml list-presentation="table"?>
306
307 <varlistentry id="ab">
308 <term><command>ab</command></term>
309 <listitem>
310 <para>
311 is a tool for benchmarking your <application>Apache</application>
312 HTTP server.
313 </para>
314 <indexterm zone="apache ab">
315 <primary sortas="b-ab">ab</primary>
316 </indexterm>
317 </listitem>
318 </varlistentry>
319
320 <varlistentry id="apachectl">
321 <term><command>apachectl</command></term>
322 <listitem>
323 <para>
324 is a front end to the <application>Apache</application> HTTP server
325 which is designed to help the administrator control the functioning
326 of the <application>Apache</application> httpd daemon.
327 </para>
328 <indexterm zone="apache apachectl">
329 <primary sortas="b-apachectl">apachectl</primary>
330 </indexterm>
331 </listitem>
332 </varlistentry>
333
334 <varlistentry id="apxs">
335 <term><command>apxs</command></term>
336 <listitem>
337 <para>
338 is a tool for building and installing extension modules for the
339 <application>Apache</application> HTTP server.
340 </para>
341 <indexterm zone="apache apxs">
342 <primary sortas="b-apxs">apxs</primary>
343 </indexterm>
344 </listitem>
345 </varlistentry>
346
347 <varlistentry id="checkgid">
348 <term><command>checkgid</command></term>
349 <listitem>
350 <para>
351 is a program that checks whether it can setgid to the group
352 specified. This is to see if it is a valid group for Apache2 to use
353 at runtime. If the user (should be run as superuser) is in that
354 group, or can setgid to it, it will return 0.
355 </para>
356 <indexterm zone="apache checkgid">
357 <primary sortas="b-checkgid">checkgid</primary>
358 </indexterm>
359 </listitem>
360 </varlistentry>
361
362 <varlistentry id="dbmmanage">
363 <term><command>dbmmanage</command></term>
364 <listitem>
365 <para>
366 is used to create and update the DBM format files used to store
367 usernames and passwords for basic authentication of HTTP users.
368 </para>
369 <indexterm zone="apache dbmmanage">
370 <primary sortas="b-dbmmanage">dbmmanage</primary>
371 </indexterm>
372 </listitem>
373 </varlistentry>
374
375 <varlistentry id="htcacheclean">
376 <term><command>htcacheclean</command></term>
377 <listitem>
378 <para>
379 is used to clean up the disk cache.
380 </para>
381 <indexterm zone="apache htcacheclean">
382 <primary sortas="b-htcacheclean">htcacheclean</primary>
383 </indexterm>
384 </listitem>
385 </varlistentry>
386
387 <varlistentry id="htdbm">
388 <term><command>htdbm</command></term>
389 <listitem>
390 <para>
391 is used to manipulate the DBM password databases.
392 </para>
393 <indexterm zone="apache htdbm">
394 <primary sortas="b-htdbm">htdbm</primary>
395 </indexterm>
396 </listitem>
397 </varlistentry>
398
399 <varlistentry id="htdigest">
400 <term><command>htdigest</command></term>
401 <listitem>
402 <para>
403 is used to create and update the flat-files used to store usernames,
404 realms and passwords for digest authentication of HTTP users.
405 </para>
406 <indexterm zone="apache htdigest">
407 <primary sortas="b-htdigest">htdigest</primary>
408 </indexterm>
409 </listitem>
410 </varlistentry>
411
412 <varlistentry id="htpasswd">
413 <term><command>htpasswd</command></term>
414 <listitem>
415 <para>
416 is used to create and update the flat-files used to store usernames
417 and passwords for basic authentication of HTTP users.
418 </para>
419 <indexterm zone="apache htpasswd">
420 <primary sortas="b-htpasswd">htpasswd</primary>
421 </indexterm>
422 </listitem>
423 </varlistentry>
424
425 <varlistentry id="httpd">
426 <term><command>httpd</command></term>
427 <listitem>
428 <para>
429 is the <application>Apache</application> HTTP server program.
430 </para>
431 <indexterm zone="apache httpd">
432 <primary sortas="b-httpd">httpd</primary>
433 </indexterm>
434 </listitem>
435 </varlistentry>
436
437 <varlistentry id="httxt2dbm">
438 <term><command>httxt2dbm</command></term>
439 <listitem>
440 <para>
441 is used to generate DBM files from text, for use in RewriteMap.
442 </para>
443 <indexterm zone="apache httxt2dbm">
444 <primary sortas="b-httxt2dbm">httxt2dbm</primary>
445 </indexterm>
446 </listitem>
447 </varlistentry>
448
449 <varlistentry id="logresolve">
450 <term><command>logresolve</command></term>
451 <listitem>
452 <para>
453 is a post-processing program to resolve IP-addresses in
454 <application>Apache</application>'s access log files.
455 </para>
456 <indexterm zone="apache logresolve">
457 <primary sortas="b-logresolve">logresolve</primary>
458 </indexterm>
459 </listitem>
460 </varlistentry>
461
462 <varlistentry id="rotatelogs">
463 <term><command>rotatelogs</command></term>
464 <listitem>
465 <para>
466 is a simple program for use in conjunction with
467 <application>Apache</application>'s piped log file feature.
468 </para>
469 <indexterm zone="apache rotatelogs">
470 <primary sortas="b-rotatelogs">rotatelogs</primary>
471 </indexterm>
472 </listitem>
473 </varlistentry>
474 </variablelist>
475 </sect2>
476</sect1>
Note: See TracBrowser for help on using the repository browser.