source: server/major/apache.xml@ 07499ecc

10.0 10.1 11.0 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind ken/refactor-virt lazarus perl-modules qt5new trunk xry111/git-date xry111/git-date-for-trunk xry111/git-date-test
Last change on this file since 07499ecc was 07499ecc, checked in by Bruce Dubbs <bdubbs@…>, 3 years ago

Archive udisks
Tags for general/progs

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

  • Property mode set to 100644
File size: 17.2 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 "https://archive.apache.org/dist/httpd/httpd-&apache-version;.tar.bz2">
9 <!ENTITY apache-download-ftp " ">
10 <!ENTITY apache-md5sum "818adca52f3be187fe45d6822755be95">
11 <!ENTITY apache-size "6.6 MB">
12 <!ENTITY apache-buildsize "115 MB">
13 <!ENTITY apache-time "0.9 SBU">
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 HTTPD</title>
32
33 <para>
34 The <application>Apache HTTPD</application> package contains an open-source HTTP
35 server. It is useful for creating local intranet web sites or running huge
36 web serving operations.
37 </para>
38
39 &lfs83_checked;
40
41 <bridgehead renderas="sect3">Package Information</bridgehead>
42 <itemizedlist spacing="compact">
43 <listitem>
44 <para>
45 Download (HTTP): <ulink url="&apache-download-http;"/>
46 </para>
47 </listitem>
48 <listitem>
49 <para>
50 Download (FTP): <ulink url="&apache-download-ftp;"/>
51 </para>
52 </listitem>
53 <listitem>
54 <para>
55 Download MD5 sum: &apache-md5sum;
56 </para>
57 </listitem>
58 <listitem>
59 <para>
60 Download size: &apache-size;
61 </para>
62 </listitem>
63 <listitem>
64 <para>
65 Estimated disk space required: &apache-buildsize;
66 </para>
67 </listitem>
68 <listitem>
69 <para>
70 Estimated build time: &apache-time;
71 </para>
72 </listitem>
73 </itemizedlist>
74
75 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
76 <itemizedlist spacing="compact">
77 <listitem>
78 <para>
79 Required patch:
80 <ulink url="&patch-root;/httpd-&apache-version;-blfs_layout-1.patch"/>
81 </para>
82 </listitem>
83 </itemizedlist>
84
85 <bridgehead renderas="sect3">Apache HTTPD Dependencies</bridgehead>
86
87 <bridgehead renderas="sect4">Required</bridgehead>
88 <para role="required">
89 <xref linkend="apr-util"/> and
90 <xref linkend="pcre"/>
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="libxml2"/>,
103 <xref linkend="lynx"/> or
104 <xref linkend="Links"/> or
105 <ulink url="http://elinks.or.cz/">ELinks</ulink>,
106 <xref linkend="nghttp2"/>,
107 <xref linkend="openldap"/> (<xref linkend="apr-util"/> needs to be
108 installed with ldap suport),
109 <xref linkend="rsync"/>,
110 <ulink url="https://sourceforge.net/projects/distcache">Distcache</ulink>, and
111 <xref linkend="lua"/>
112 </para>
113
114 <para condition="html" role="usernotes">
115 User Notes: <ulink url="&blfs-wiki;/apache"/>
116 </para>
117 </sect2>
118
119 <sect2 role="installation">
120 <title>Installation of Apache HTTPD</title>
121
122 <para>
123 For security reasons, running the server as an unprivileged user and group
124 is strongly encouraged. Create the following group and user using the
125 following commands as <systemitem class="username">root</systemitem>:
126 </para>
127
128<screen role="root"><userinput>groupadd -g 25 apache &amp;&amp;
129useradd -c "Apache Server" -d /srv/www -g apache \
130 -s /bin/false -u 25 apache</userinput></screen>
131
132 <para>
133 Build and install <application>Apache HTTPD</application> by running the
134 following commands:
135 </para>
136
137<screen><userinput>patch -Np1 -i ../httpd-&apache-version;-blfs_layout-1.patch &amp;&amp;
138
139sed '/dir.*CFG_PREFIX/s@^@#@' -i support/apxs.in &amp;&amp;
140
141./configure --enable-authnz-fcgi \
142 --enable-layout=BLFS \
143 --enable-mods-shared="all cgi" \
144 --enable-mpms-shared=all \
145 --enable-suexec=shared \
146 --with-apr=/usr/bin/apr-1-config \
147 --with-apr-util=/usr/bin/apu-1-config \
148 --with-suexec-bin=/usr/lib/httpd/suexec \
149 --with-suexec-caller=apache \
150 --with-suexec-docroot=/srv/www \
151 --with-suexec-logfile=/var/log/httpd/suexec.log \
152 --with-suexec-uidmin=100 \
153 --with-suexec-userdir=public_html &amp;&amp;
154make</userinput></screen>
155
156 <para>
157 This package does not come with a test suite.
158 </para>
159
160 <para>
161 Now, as the <systemitem class="username">root</systemitem> user:
162 </para>
163
164 <note><para>This package does not install properly using DESTDIR
165 techniques as an unpriviledged user.</para></note>
166
167<screen role="root"><userinput>make install &amp;&amp;
168
169mv -v /usr/sbin/suexec /usr/lib/httpd/suexec &amp;&amp;
170chgrp apache /usr/lib/httpd/suexec &amp;&amp;
171chmod 4754 /usr/lib/httpd/suexec &amp;&amp;
172
173chown -v -R apache:apache /srv/www</userinput></screen>
174
175 </sect2>
176
177 <sect2 role="commands">
178 <title>Command Explanations</title>
179
180 <para>
181 <command>sed '/dir.*CFG_PREFIX/s@^@#@'...</command>: Forces the
182 <application>apxs</application> utility to use absolute pathnames for
183 modules, when instructed to do so.
184 </para>
185
186 <para>
187 <parameter>--enable-authnz-fcgi</parameter>: Build FastCGI
188 authorizer-based authentication and authorization (mod_authnz_fcgi.so
189 fast CGI module).
190 </para>
191
192 <para>
193 <parameter>--enable-mods-shared="all cgi"</parameter>: The modules should be
194 compiled and used as Dynamic Shared Objects (DSOs) so they can be included
195 and excluded from the server using the run-time configuration directives.
196 </para>
197
198 <para>
199 <parameter>--enable-mpms-shared=all</parameter>: This switch ensures that
200 all MPM (Multi Processing Modules) are built as Dynamic Shared Objects
201 (DSOs), so the user can choose which one to use at runtime.
202 </para>
203
204 <para>
205 <parameter>--enable-suexec</parameter>: This switch enables building of the
206 <application>Apache</application> suEXEC module which can be used to allow
207 users to run CGI and SSI scripts under user IDs different from the user ID
208 of the calling web server.
209 </para>
210
211 <para>
212 <parameter>--with-suexec-*</parameter>: These switches control suEXEC module
213 behavior, such as default document root, minimal UID that can be used to
214 run the script under the suEXEC. Please note that with minimal UID 100, you
215 can't run CGI or SSI scripts under suEXEC as the
216 <systemitem class="username">apache</systemitem> user.
217 </para>
218
219 <para>
220 <command>... /usr/lib/httpd/suexec</command>: These commands put
221 <command>suexec</command> wrapper into proper location, since it
222 is not meant to be run directly. They also adjust proper
223 permissions of the binary, making it setgid
224 <systemitem class="username">apache</systemitem>.
225 </para>
226
227 <para>
228 <command>chown -R apache:apache /srv/www</command>: By default, the
229 installation process installs files (documentation, error messages,
230 default icons, etc.) with the ownership of the user that extracted the
231 files from the tar file. If you want to change the ownership to another
232 user, you should do so at this point. The only requirement is that the
233 document directories need to be accessible by the <command>httpd</command>
234 process with (r-x) permissions and files need to be readable (r--) by the
235 <systemitem class="username">apache</systemitem> user.
236 </para>
237
238 </sect2>
239
240 <sect2 role="configuration">
241 <title>Configuring Apache</title>
242
243 <sect3 id="apache-config">
244 <title>Config Files</title>
245
246 <para>
247 <filename>/etc/httpd/httpd.conf</filename> and
248 <filename>/etc/httpd/extra/*</filename>
249 </para>
250
251 <indexterm zone="apache apache-config">
252 <primary sortas="e-etc-httpd-httpd.conf">/etc/httpd/httpd.conf</primary>
253 </indexterm>
254
255 <indexterm zone="apache apache-config">
256 <primary sortas="e-etc-httpd-extra-star">/etc/httpd/extra/*</primary>
257 </indexterm>
258
259 </sect3>
260
261 <sect3>
262 <title>Configuration Information</title>
263
264 <para>
265 See <ulink url="file:///usr/share/httpd/manual/configuring.html"/>
266 for detailed instructions on customising your
267 <application>Apache</application> HTTP server configuration file.
268 </para>
269
270 </sect3>
271
272 <sect3 id="httpd-init">
273 <title><phrase revision="sysv">Boot Script</phrase>
274 <phrase revision="systemd">Systemd Unit</phrase></title>
275
276 <para>
277 If you want the <application>Apache</application> server to
278 start automatically when the system is booted, install the
279 <phrase revision="sysv"><filename>/etc/rc.d/init.d/httpd</filename>
280 init script</phrase>
281 <phrase revision="systemd"><filename>httpd.service</filename>
282 unit</phrase> included in the
283 <xref linkend="bootscripts" revision="sysv"/>
284 <xref linkend="systemd-units" revision="systemd"/> package.
285 </para>
286
287 <indexterm zone="apache httpd-init">
288 <primary sortas="f-apache">apache</primary>
289 </indexterm>
290
291<screen role="root"><userinput>make install-httpd</userinput></screen>
292
293 </sect3>
294
295 </sect2>
296
297 <sect2 role="content">
298 <title>Contents</title>
299
300 <segmentedlist>
301 <segtitle>Installed Programs</segtitle>
302 <segtitle>Installed Libraries</segtitle>
303 <segtitle>Installed Directories</segtitle>
304
305 <seglistitem>
306 <seg>
307 ab, apachectl, apxs, checkgid, dbmmanage, fcgistarter,
308 htcacheclean, htdbm, htdigest, htpasswd, httpd,
309 httxt2dbm, logresolve, rotatelogs, and suexec
310 </seg>
311 <seg>
312 Several libraries under /usr/lib/httpd/modules/
313 </seg>
314 <seg>
315 /etc/httpd,
316 /srv/www,
317 /usr/include/httpd,
318 /usr/lib/httpd,
319 /usr/share/httpd,
320 /var/log/httpd, and
321 /var/run/httpd
322 </seg>
323 </seglistitem>
324 </segmentedlist>
325
326 <variablelist>
327 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
328 <?dbfo list-presentation="list"?>
329 <?dbhtml list-presentation="table"?>
330
331 <varlistentry id="ab">
332 <term><command>ab</command></term>
333 <listitem>
334 <para>
335 is a tool for benchmarking your <application>Apache</application>
336 HTTP server.
337 </para>
338 <indexterm zone="apache ab">
339 <primary sortas="b-ab">ab</primary>
340 </indexterm>
341 </listitem>
342 </varlistentry>
343
344 <varlistentry id="apachectl">
345 <term><command>apachectl</command></term>
346 <listitem>
347 <para>
348 is a front end to the <application>Apache</application> HTTP server
349 which is designed to help the administrator control the functioning
350 of the <application>Apache</application> httpd daemon.
351 </para>
352 <indexterm zone="apache apachectl">
353 <primary sortas="b-apachectl">apachectl</primary>
354 </indexterm>
355 </listitem>
356 </varlistentry>
357
358 <varlistentry id="apxs">
359 <term><command>apxs</command></term>
360 <listitem>
361 <para>
362 is a tool for building and installing extension modules for the
363 <application>Apache</application> HTTP server.
364 </para>
365 <indexterm zone="apache apxs">
366 <primary sortas="b-apxs">apxs</primary>
367 </indexterm>
368 </listitem>
369 </varlistentry>
370
371 <varlistentry id="checkgid">
372 <term><command>checkgid</command></term>
373 <listitem>
374 <para>
375 is a program that checks whether it can setgid to the group
376 specified. This is to see if it is a valid group for Apache2 to use
377 at runtime. If the user (should be run as superuser) is in that
378 group, or can setgid to it, it will return 0.
379 </para>
380 <indexterm zone="apache checkgid">
381 <primary sortas="b-checkgid">checkgid</primary>
382 </indexterm>
383 </listitem>
384 </varlistentry>
385
386 <varlistentry id="dbmmanage">
387 <term><command>dbmmanage</command></term>
388 <listitem>
389 <para>
390 is used to create and update the DBM format files used to store
391 usernames and passwords for basic authentication of HTTP users.
392 </para>
393 <indexterm zone="apache dbmmanage">
394 <primary sortas="b-dbmmanage">dbmmanage</primary>
395 </indexterm>
396 </listitem>
397 </varlistentry>
398
399 <varlistentry id="fcgistarter">
400 <term><command>fcgistarter</command></term>
401 <listitem>
402 <para>
403 is a tool to start a FastCGI program.
404 </para>
405 <indexterm zone="apache fcgistarter">
406 <primary sortas="b-fcgistarter">fcgistarter</primary>
407 </indexterm>
408 </listitem>
409 </varlistentry>
410
411 <varlistentry id="htcacheclean">
412 <term><command>htcacheclean</command></term>
413 <listitem>
414 <para>
415 is used to clean up the disk cache.
416 </para>
417 <indexterm zone="apache htcacheclean">
418 <primary sortas="b-htcacheclean">htcacheclean</primary>
419 </indexterm>
420 </listitem>
421 </varlistentry>
422
423 <varlistentry id="htdbm">
424 <term><command>htdbm</command></term>
425 <listitem>
426 <para>
427 is used to manipulate the DBM password databases.
428 </para>
429 <indexterm zone="apache htdbm">
430 <primary sortas="b-htdbm">htdbm</primary>
431 </indexterm>
432 </listitem>
433 </varlistentry>
434
435 <varlistentry id="htdigest">
436 <term><command>htdigest</command></term>
437 <listitem>
438 <para>
439 is used to create and update the flat-files used to store usernames,
440 realms and passwords for digest authentication of HTTP users.
441 </para>
442 <indexterm zone="apache htdigest">
443 <primary sortas="b-htdigest">htdigest</primary>
444 </indexterm>
445 </listitem>
446 </varlistentry>
447
448 <varlistentry id="htpasswd">
449 <term><command>htpasswd</command></term>
450 <listitem>
451 <para>
452 is used to create and update the flat-files used to store usernames
453 and passwords for basic authentication of HTTP users.
454 </para>
455 <indexterm zone="apache htpasswd">
456 <primary sortas="b-htpasswd">htpasswd</primary>
457 </indexterm>
458 </listitem>
459 </varlistentry>
460
461 <varlistentry id="httpd">
462 <term><command>httpd</command></term>
463 <listitem>
464 <para>
465 is the <application>Apache</application> HTTP server program.
466 </para>
467 <indexterm zone="apache httpd">
468 <primary sortas="b-httpd">httpd</primary>
469 </indexterm>
470 </listitem>
471 </varlistentry>
472
473 <varlistentry id="httxt2dbm">
474 <term><command>httxt2dbm</command></term>
475 <listitem>
476 <para>
477 is used to generate DBM files from text, for use in RewriteMap.
478 </para>
479 <indexterm zone="apache httxt2dbm">
480 <primary sortas="b-httxt2dbm">httxt2dbm</primary>
481 </indexterm>
482 </listitem>
483 </varlistentry>
484
485 <varlistentry id="logresolve">
486 <term><command>logresolve</command></term>
487 <listitem>
488 <para>
489 is a post-processing program to resolve IP-addresses in
490 <application>Apache</application>'s access log files.
491 </para>
492 <indexterm zone="apache logresolve">
493 <primary sortas="b-logresolve">logresolve</primary>
494 </indexterm>
495 </listitem>
496 </varlistentry>
497
498 <varlistentry id="rotatelogs">
499 <term><command>rotatelogs</command></term>
500 <listitem>
501 <para>
502 is a simple program for use in conjunction with
503 <application>Apache</application>'s piped log file feature.
504 </para>
505 <indexterm zone="apache rotatelogs">
506 <primary sortas="b-rotatelogs">rotatelogs</primary>
507 </indexterm>
508 </listitem>
509 </varlistentry>
510
511 <varlistentry id="suexec">
512 <term><command>suexec</command></term>
513 <listitem>
514 <para>
515 allows users to run CGI and SSI applications as a different user.
516 </para>
517 <indexterm zone="apache suexec">
518 <primary sortas="b-suexec">suexec</primary>
519 </indexterm>
520 </listitem>
521 </varlistentry>
522
523 </variablelist>
524
525 </sect2>
526
527</sect1>
Note: See TracBrowser for help on using the repository browser.