source: server/major/apache.xml@ 68995df

11.3 12.0 12.1 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt plabs/newcss python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition trunk xry111/llvm18 xry111/xf86-video-removal
Last change on this file since 68995df was 68995df, checked in by Bruce Dubbs <bdubbs@…>, 16 months ago

Add a fogotten sed to apache.

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