source: server/major/apache.xml@ eb7de89

10.0 10.1 11.0 ken/refactor-virt lazarus qt5new trunk xry111/git-date xry111/git-date-for-trunk xry111/git-date-test
Last change on this file since eb7de89 was eb7de89, checked in by Douglas R. Reno <renodr@…>, 16 months ago

Update to lua-5.4.0
VIM: Adapt Lua interface to Lua-5.4
Apache/httpd: Adapt Lua module to Lua-5.4
Brotli: Remove invalid dependency on lua, there is a separate package that provides one, and it's not bundled with our download of Brotli
Dovecot: Add a command explanation describing how to build Lua support
Lua-5.2: Minor adjustment to installed files
Hexchat: Promote libcanberra to recommended

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

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