source: server/major/apache.xml@ efe28817

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 efe28817 was efe28817, checked in by Krejzi <krejzi@…>, 11 years ago

Rework Apache HTTPD instructions.

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

  • Property mode set to 100644
File size: 15.0 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 "87aaf7bc7e8715f0455997bb8c6791aa">
12 <!ENTITY apache-size "4.4 MB">
13 <!ENTITY apache-buildsize "100 MB">
14 <!ENTITY apache-time "0.5 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 HTTPD</title>
33
34 <para>
35 The <application>Apache HTTPD</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 &lfs72_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">Additional Downloads</bridgehead>
77 <itemizedlist spacing="compact">
78 <listitem>
79 <para>
80 Required patch:
81 <ulink url="&patch-root;/httpd-&apache-version;-blfs_layout-1.patch"/>
82 </para>
83 </listitem>
84 </itemizedlist>
85
86 <bridgehead renderas="sect3">Apache HTTPD Dependencies</bridgehead>
87
88 <bridgehead renderas="sect4">Required</bridgehead>
89 <para role="required">
90 <xref linkend="apr-util"/>
91 </para>
92
93 <bridgehead renderas="sect4">Recommended</bridgehead>
94 <para role="recommended">
95 <xref linkend="openssl"/>
96 </para>
97
98 <bridgehead renderas="sect4">Optional</bridgehead>
99 <para role="optional">
100 <xref linkend="db"/>,
101 <xref linkend="doxygen"/>,
102 <xref linkend="lynx"/>,
103 <xref linkend="openldap"/>,
104 <xref linkend="pcre"/>,
105 <xref linkend="rsync"/>,
106 <ulink url="http://www.distcache.org/">Distcache</ulink> and
107 <ulink url="http://www.lua.org/">Lua (5.1)</ulink>
108 </para>
109
110 <para condition="html" role="usernotes">
111 User Notes: <ulink url="&blfs-wiki;/apache"/>
112 </para>
113 </sect2>
114
115 <sect2 role="installation">
116 <title>Installation of Apache HTTPD</title>
117
118 <para>
119 For security reasons, running the server as an unprivileged user and group
120 is strongly encouraged. Create the following group and user using the
121 following commands as <systemitem class="username">root</systemitem>:
122 </para>
123
124<screen role="root"><userinput>groupadd -g 25 apache &amp;&amp;
125useradd -c "Apache Server" -d /srv/www -g apache \
126 -s /bin/false -u 25 apache</userinput></screen>
127
128 <para>
129 Build and install <application>Apache HTTPD</application> by running the
130 following commands:
131 </para>
132
133<screen><userinput>patch -Np1 -i ../httpd-&apache-version;-blfs_layout-1.patch &amp;&amp;
134./configure --enable-layout=BLFS \
135 --enable-mods-shared="all cgi" \
136 --enable-mpms-shared=all \
137 --with-apr=/usr/bin/apr-1-config \
138 --with-apr-util=/usr/bin/apu-1-config \
139 --enable-suexec=shared \
140 --with-suexec-bin=/usr/lib/httpd/suexec \
141 --with-suexec-docroot=/srv/www \
142 --with-suexec-caller=apache \
143 --with-suexec-userdir=public_html \
144 --with-suexec-logfile=/var/log/httpd/suexec.log \
145 --with-suexec-uidmin=100 &amp;&amp;
146make</userinput></screen>
147
148 <para>
149 This package does not come with a test suite.
150 </para>
151
152 <para>
153 Now, as the <systemitem class="username">root</systemitem> user:
154 </para>
155
156<screen role="root"><userinput>make install &amp;&amp;
157
158mv -v /usr/sbin/suexec /usr/lib/httpd/suexec &amp;&amp;
159chgrp apache /usr/lib/httpd/suexec &amp;&amp;
160chmod 4754 /usr/lib/httpd/suexec &amp;&amp;
161
162chown -v -R apache:apache /srv/www</userinput></screen>
163
164 </sect2>
165
166 <sect2 role="commands">
167 <title>Command Explanations</title>
168
169 <para>
170 <parameter>--enable-mods-shared="all cgi"</parameter>: The modules should be
171 compiled and used as Dynamic Shared Objects (DSOs) so they can be included
172 and excluded from the server using the run-time configuration directives.
173 </para>
174
175 <para>
176 <parameter>--enable-mpm-shared=all</parameter>: This switch ensures that all
177 MPM (Multi Processing Modules) are built as Dynamic Shared Objects (DSOs),
178 so the user can choose which one to use at runtime.
179 </para>
180
181 <para>
182 <parameter>--enable-suexec</parameter>: This switch enables building of the
183 <application>Apache</application> suEXEC module which can be used to allow
184 users to run CGI and SSI scripts under user IDs different from the user ID
185 of the calling web server.
186 </para>
187
188 <para>
189 <parameter>--with-suexec-*</parameter>: These switches control suEXEC module
190 behavior, such as default document root, minimal UID that can be used to
191 run the script under the suEXEC. Please note that with minimal UID 100, you
192 can't run CGI or SSI scripts under suEXEC as the
193 <systemitem class="username">apache</systemitem> user.
194 </para>
195
196 <para>
197 <command>... /usr/lib/httpd/suexec</command>: These commands put
198 <command>suexec</command> wrapper into proper location, since it
199 is not meant to be run directly. They also adjust proper
200 permissions of the binary, making it segid
201 <systemitem class="username">apache</systemitem>.
202 </para>
203
204 <para>
205 <command>chown -R apache:apache /srv/www</command>: By default, the
206 installation process installs files (documentation, error messages,
207 default icons, etc.) with the ownership of the user that extracted the
208 files from the tar file. If you want to change the ownership to another
209 user, you should do so at this point. The only requirement is that the
210 document directories need to be accessible by the <command>httpd</command>
211 process with (r-x) permissions and files need to be readable (r--) by the
212 <systemitem class="username">apache</systemitem> user.
213 </para>
214
215 </sect2>
216
217 <sect2 role="configuration">
218 <title>Configuring Apache</title>
219
220 <sect3 id="apache-config">
221 <title>Config Files</title>
222
223 <para>
224 <filename>/etc/httpd/httpd.conf</filename> and
225 <filename>/etc/httpd/extra/*</filename>
226 </para>
227
228 <indexterm zone="apache apache-config">
229 <primary sortas="e-etc-httpd-httpd.conf">/etc/httpd/httpd.conf</primary>
230 </indexterm>
231
232 <indexterm zone="apache apache-config">
233 <primary sortas="e-etc-httpd-extra-star">/etc/httpd/extra/*</primary>
234 </indexterm>
235
236 </sect3>
237
238 <sect3>
239 <title>Configuration Information</title>
240
241 <para>
242 See <ulink url="/usr/share/httpd/manual/configuring.html"/>
243 for detailed instructions on customising your
244 <application>Apache</application> HTTP server configuration file.
245 </para>
246
247 </sect3>
248
249 <sect3 id="httpd-init">
250 <title>Boot Script</title>
251
252 <para>
253 If you want the <application>Apache</application> server to
254 start automatically when the system is booted, install the
255 <filename>/etc/rc.d/init.d/httpd</filename> init script included
256 in the <xref linkend="bootscripts"/> package.
257 </para>
258
259 <indexterm zone="apache httpd-init">
260 <primary sortas="f-apache">apache</primary>
261 </indexterm>
262
263<screen role="root"><userinput>make install-httpd</userinput></screen>
264 </sect3>
265 </sect2>
266
267 <sect2 role="content">
268 <title>Contents</title>
269
270 <segmentedlist>
271 <segtitle>Installed Programs</segtitle>
272 <segtitle>Installed Libraries</segtitle>
273 <segtitle>Installed Directories</segtitle>
274
275 <seglistitem>
276 <seg>
277 ab, apachectl, apxs, checkgid, dbmmanage, fcgistarter, htcacheclean,
278 htdbm, htdigest, htpasswd, httpd, httxt2dbm, logresolve and rotatelogs
279 </seg>
280 <seg>
281 None
282 </seg>
283 <seg>
284 /etc/httpd,
285 /srv/www,
286 /usr/include/httpd,
287 /usr/lib/httpd,
288 /usr/share/httpd
289 /var/log/httpd and
290 /var/run/httpd
291 </seg>
292 </seglistitem>
293 </segmentedlist>
294
295 <variablelist>
296 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
297 <?dbfo list-presentation="list"?>
298 <?dbhtml list-presentation="table"?>
299
300 <varlistentry id="ab">
301 <term><command>ab</command></term>
302 <listitem>
303 <para>
304 is a tool for benchmarking your <application>Apache</application>
305 HTTP server.
306 </para>
307 <indexterm zone="apache ab">
308 <primary sortas="b-ab">ab</primary>
309 </indexterm>
310 </listitem>
311 </varlistentry>
312
313 <varlistentry id="apachectl">
314 <term><command>apachectl</command></term>
315 <listitem>
316 <para>
317 is a front end to the <application>Apache</application> HTTP server
318 which is designed to help the administrator control the functioning
319 of the <application>Apache</application> httpd daemon.
320 </para>
321 <indexterm zone="apache apachectl">
322 <primary sortas="b-apachectl">apachectl</primary>
323 </indexterm>
324 </listitem>
325 </varlistentry>
326
327 <varlistentry id="apxs">
328 <term><command>apxs</command></term>
329 <listitem>
330 <para>
331 is a tool for building and installing extension modules for the
332 <application>Apache</application> HTTP server.
333 </para>
334 <indexterm zone="apache apxs">
335 <primary sortas="b-apxs">apxs</primary>
336 </indexterm>
337 </listitem>
338 </varlistentry>
339
340 <varlistentry id="checkgid">
341 <term><command>checkgid</command></term>
342 <listitem>
343 <para>
344 is a program that checks whether it can setgid to the group
345 specified. This is to see if it is a valid group for Apache2 to use
346 at runtime. If the user (should be run as superuser) is in that
347 group, or can setgid to it, it will return 0.
348 </para>
349 <indexterm zone="apache checkgid">
350 <primary sortas="b-checkgid">checkgid</primary>
351 </indexterm>
352 </listitem>
353 </varlistentry>
354
355 <varlistentry id="dbmmanage">
356 <term><command>dbmmanage</command></term>
357 <listitem>
358 <para>
359 is used to create and update the DBM format files used to store
360 usernames and passwords for basic authentication of HTTP users.
361 </para>
362 <indexterm zone="apache dbmmanage">
363 <primary sortas="b-dbmmanage">dbmmanage</primary>
364 </indexterm>
365 </listitem>
366 </varlistentry>
367
368 <varlistentry id="htcacheclean">
369 <term><command>htcacheclean</command></term>
370 <listitem>
371 <para>
372 is used to clean up the disk cache.
373 </para>
374 <indexterm zone="apache htcacheclean">
375 <primary sortas="b-htcacheclean">htcacheclean</primary>
376 </indexterm>
377 </listitem>
378 </varlistentry>
379
380 <varlistentry id="htdbm">
381 <term><command>htdbm</command></term>
382 <listitem>
383 <para>
384 is used to manipulate the DBM password databases.
385 </para>
386 <indexterm zone="apache htdbm">
387 <primary sortas="b-htdbm">htdbm</primary>
388 </indexterm>
389 </listitem>
390 </varlistentry>
391
392 <varlistentry id="htdigest">
393 <term><command>htdigest</command></term>
394 <listitem>
395 <para>
396 is used to create and update the flat-files used to store usernames,
397 realms and passwords for digest authentication of HTTP users.
398 </para>
399 <indexterm zone="apache htdigest">
400 <primary sortas="b-htdigest">htdigest</primary>
401 </indexterm>
402 </listitem>
403 </varlistentry>
404
405 <varlistentry id="htpasswd">
406 <term><command>htpasswd</command></term>
407 <listitem>
408 <para>
409 is used to create and update the flat-files used to store usernames
410 and passwords for basic authentication of HTTP users.
411 </para>
412 <indexterm zone="apache htpasswd">
413 <primary sortas="b-htpasswd">htpasswd</primary>
414 </indexterm>
415 </listitem>
416 </varlistentry>
417
418 <varlistentry id="httpd">
419 <term><command>httpd</command></term>
420 <listitem>
421 <para>
422 is the <application>Apache</application> HTTP server program.
423 </para>
424 <indexterm zone="apache httpd">
425 <primary sortas="b-httpd">httpd</primary>
426 </indexterm>
427 </listitem>
428 </varlistentry>
429
430 <varlistentry id="httxt2dbm">
431 <term><command>httxt2dbm</command></term>
432 <listitem>
433 <para>
434 is used to generate DBM files from text, for use in RewriteMap.
435 </para>
436 <indexterm zone="apache httxt2dbm">
437 <primary sortas="b-httxt2dbm">httxt2dbm</primary>
438 </indexterm>
439 </listitem>
440 </varlistentry>
441
442 <varlistentry id="logresolve">
443 <term><command>logresolve</command></term>
444 <listitem>
445 <para>
446 is a post-processing program to resolve IP-addresses in
447 <application>Apache</application>'s access log files.
448 </para>
449 <indexterm zone="apache logresolve">
450 <primary sortas="b-logresolve">logresolve</primary>
451 </indexterm>
452 </listitem>
453 </varlistentry>
454
455 <varlistentry id="rotatelogs">
456 <term><command>rotatelogs</command></term>
457 <listitem>
458 <para>
459 is a simple program for use in conjunction with
460 <application>Apache</application>'s piped log file feature.
461 </para>
462 <indexterm zone="apache rotatelogs">
463 <primary sortas="b-rotatelogs">rotatelogs</primary>
464 </indexterm>
465 </listitem>
466 </varlistentry>
467
468 </variablelist>
469
470 </sect2>
471
472</sect1>
Note: See TracBrowser for help on using the repository browser.