source: server/major/apache.xml@ 3c7bd00

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 7.10 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt nosym perl-modules plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 3c7bd00 was 3c7bd00, checked in by DJ Lucas <dj@…>, 8 years ago

Temporary render fix for bootscripts with REV=systemd.

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

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