source: server/major/apache.xml@ f7841987

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 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 f7841987 was f7841987, checked in by Pierre Labastie <pieere@…>, 8 years ago

Another run of parameter vs option fixes

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

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