source: server/major/apache.xml@ 45ab6c7

11.0 11.1 11.2 11.3 12.0 12.1 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt 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 45ab6c7 was 45ab6c7, checked in by Xi Ruoyao <xry111@…>, 3 years ago

more SVN prop clean up

Remove "$LastChanged$" everywhere, and also some unused $Date$

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