source: server/major/apache.xml@ 5fd872d

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 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 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 5fd872d was 5fd872d, checked in by Bruce Dubbs <bdubbs@…>, 7 years ago

Update to mariadb-10.2.7.
Update to git-2.13.3.
Update to avahi-0.7.
Update to httpd-2.4.27.

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

  • Property mode set to 100644
File size: 17.2 KB
RevLine 
[08254fc]1<?xml version="1.0" encoding="ISO-8859-1"?>
[6732c094]2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
[08254fc]4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6
[6041710]7 <!ENTITY apache-download-http
[18715a85]8 "https://archive.apache.org/dist/httpd/httpd-&apache-version;.tar.bz2">
[4890200]9 <!ENTITY apache-download-ftp " ">
[5fd872d]10 <!ENTITY apache-md5sum "97b6bbfa83c866dbe20ef317e3afd108">
[e9cab664]11 <!ENTITY apache-size "6.2 MB">
12 <!ENTITY apache-buildsize "118 MB">
[5fd872d]13 <!ENTITY apache-time "0.7 SBU">
[08254fc]14]>
15
[7c7fa7d]16<sect1 id="apache" xreflabel="Apache-&apache-version;">
[ab3a3af7]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">
[efe28817]31 <title>Introduction to Apache HTTPD</title>
[ab3a3af7]32
[6041710]33 <para>
[efe28817]34 The <application>Apache HTTPD</application> package contains an open-source HTTP
[6041710]35 server. It is useful for creating local intranet web sites or running huge
36 web serving operations.
37 </para>
[ab3a3af7]38
[33c6126]39 &lfs80_checked;
[5fd872d]40 &gcc7_checked;
[20e6cade]41
[ab3a3af7]42 <bridgehead renderas="sect3">Package Information</bridgehead>
43 <itemizedlist spacing="compact">
44 <listitem>
[6041710]45 <para>
46 Download (HTTP): <ulink url="&apache-download-http;"/>
47 </para>
[ab3a3af7]48 </listitem>
49 <listitem>
[6041710]50 <para>
51 Download (FTP): <ulink url="&apache-download-ftp;"/>
52 </para>
[ab3a3af7]53 </listitem>
54 <listitem>
[6041710]55 <para>
56 Download MD5 sum: &apache-md5sum;
57 </para>
[ab3a3af7]58 </listitem>
59 <listitem>
[6041710]60 <para>
61 Download size: &apache-size;
62 </para>
[ab3a3af7]63 </listitem>
64 <listitem>
[6041710]65 <para>
66 Estimated disk space required: &apache-buildsize;
67 </para>
[ab3a3af7]68 </listitem>
69 <listitem>
[6041710]70 <para>
71 Estimated build time: &apache-time;
72 </para>
[3ae60ba7]73 </listitem>
[ab3a3af7]74 </itemizedlist>
75
[efe28817]76 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
77 <itemizedlist spacing="compact">
78 <listitem>
79 <para>
80 Required patch:
81 <ulink url="&patch-root;/httpd-&apache-version;-blfs_layout-1.patch"/>
82 </para>
83 </listitem>
84 </itemizedlist>
85
86 <bridgehead renderas="sect3">Apache HTTPD Dependencies</bridgehead>
[ab3a3af7]87
[6041710]88 <bridgehead renderas="sect4">Required</bridgehead>
89 <para role="required">
[4049347a]90 <xref linkend="apr-util"/> and
91 <xref linkend="pcre"/>
[6041710]92 </para>
[3cb0c57]93
[efe28817]94 <bridgehead renderas="sect4">Recommended</bridgehead>
95 <para role="recommended">
96 <xref linkend="openssl"/>
97 </para>
98
[6041710]99 <bridgehead renderas="sect4">Optional</bridgehead>
100 <para role="optional">
[0d7900a]101 <xref linkend="db"/>,
[efe28817]102 <xref linkend="doxygen"/>,
[fd69a62]103 <xref linkend="libxml2"/>,
[c41d6d5]104 <xref linkend="lynx"/> or
105 <xref linkend="Links"/> or
106 <ulink url="http://elinks.or.cz/">ELinks</ulink>,
[0c702b61]107 <xref linkend="nghttp2"/>,
[fd69a62]108 <xref linkend="openldap"/> (<xref linkend="apr-util"/> needs to be
109 installed with ldap suport),
[6041710]110 <xref linkend="rsync"/>,
[3e30e1b]111 <ulink url="https://sourceforge.net/projects/distcache">Distcache</ulink>, and
[32d4980]112 <xref linkend="lua"/>
[6041710]113 </para>
114
115 <para condition="html" role="usernotes">
116 User Notes: <ulink url="&blfs-wiki;/apache"/>
117 </para>
[ab3a3af7]118 </sect2>
119
120 <sect2 role="installation">
[efe28817]121 <title>Installation of Apache HTTPD</title>
[ab3a3af7]122
[6041710]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>
[ab3a3af7]128
[b785ab29]129<screen role="root"><userinput>groupadd -g 25 apache &amp;&amp;
[efe28817]130useradd -c "Apache Server" -d /srv/www -g apache \
[b785ab29]131 -s /bin/false -u 25 apache</userinput></screen>
[ab3a3af7]132
[6041710]133 <para>
[efe28817]134 Build and install <application>Apache HTTPD</application> by running the
[6041710]135 following commands:
136 </para>
137
[a4f37269]138<screen><userinput>
139patch -Np1 -i ../httpd-&apache-version;-blfs_layout-1.patch &amp;&amp;
140
141sed '/dir.*CFG_PREFIX/s@^@#@' -i support/apxs.in &amp;&amp;
142
143./configure --enable-authnz-fcgi \
144 --enable-layout=BLFS \
145 --enable-mods-shared="all cgi" \
146 --enable-mpms-shared=all \
147 --enable-suexec=shared \
148 --with-apr=/usr/bin/apr-1-config \
149 --with-apr-util=/usr/bin/apu-1-config \
150 --with-suexec-bin=/usr/lib/httpd/suexec \
151 --with-suexec-caller=apache \
152 --with-suexec-docroot=/srv/www \
153 --with-suexec-logfile=/var/log/httpd/suexec.log \
154 --with-suexec-uidmin=100 \
155 --with-suexec-userdir=public_html &amp;&amp;
[ab3a3af7]156make</userinput></screen>
157
[6041710]158 <para>
159 This package does not come with a test suite.
160 </para>
[ab3a3af7]161
[6041710]162 <para>
[3add494]163 Now, as the <systemitem class="username">root</systemitem> user:
[6041710]164 </para>
[ab3a3af7]165
[3add494]166 <note><para>This package does not install properly using DESTDIR
167 techniques as an unpriviledged user.</para></note>
168
[a4f37269]169<screen role="root"><userinput>make install &amp;&amp;
[63aeb2c]170
[efe28817]171mv -v /usr/sbin/suexec /usr/lib/httpd/suexec &amp;&amp;
[0a2b9de8]172chgrp apache /usr/lib/httpd/suexec &amp;&amp;
173chmod 4754 /usr/lib/httpd/suexec &amp;&amp;
[63aeb2c]174
[f165eea]175chown -v -R apache:apache /srv/www</userinput></screen>
[08254fc]176
[ab3a3af7]177 </sect2>
[08254fc]178
[ab3a3af7]179 <sect2 role="commands">
180 <title>Command Explanations</title>
[08254fc]181
[68c04ad]182 <para>
183 <command>sed '/dir.*CFG_PREFIX/s@^@#@'...</command>: Forces the
184 <application>apxs</application> utility to use absolute pathnames for
185 modules, when instructed to do so.
186 </para>
187
[14dc4b73]188 <para>
189 <parameter>--enable-authnz-fcgi</parameter>: Build FastCGI
190 authorizer-based authentication and authorization (mod_authnz_fcgi.so
191 fast CGI module).
192 </para>
193
[6041710]194 <para>
[efe28817]195 <parameter>--enable-mods-shared="all cgi"</parameter>: The modules should be
[6041710]196 compiled and used as Dynamic Shared Objects (DSOs) so they can be included
197 and excluded from the server using the run-time configuration directives.
198 </para>
199
200 <para>
[f7841987]201 <parameter>--enable-mpms-shared=all</parameter>: This switch ensures that
202 all MPM (Multi Processing Modules) are built as Dynamic Shared Objects
203 (DSOs), so the user can choose which one to use at runtime.
[efe28817]204 </para>
205
206 <para>
207 <parameter>--enable-suexec</parameter>: This switch enables building of the
208 <application>Apache</application> suEXEC module which can be used to allow
209 users to run CGI and SSI scripts under user IDs different from the user ID
210 of the calling web server.
211 </para>
212
213 <para>
214 <parameter>--with-suexec-*</parameter>: These switches control suEXEC module
215 behavior, such as default document root, minimal UID that can be used to
216 run the script under the suEXEC. Please note that with minimal UID 100, you
217 can't run CGI or SSI scripts under suEXEC as the
218 <systemitem class="username">apache</systemitem> user.
219 </para>
220
221 <para>
222 <command>... /usr/lib/httpd/suexec</command>: These commands put
223 <command>suexec</command> wrapper into proper location, since it
224 is not meant to be run directly. They also adjust proper
[0a2b9de8]225 permissions of the binary, making it setgid
[efe28817]226 <systemitem class="username">apache</systemitem>.
[6041710]227 </para>
228
229 <para>
230 <command>chown -R apache:apache /srv/www</command>: By default, the
231 installation process installs files (documentation, error messages,
232 default icons, etc.) with the ownership of the user that extracted the
233 files from the tar file. If you want to change the ownership to another
234 user, you should do so at this point. The only requirement is that the
235 document directories need to be accessible by the <command>httpd</command>
236 process with (r-x) permissions and files need to be readable (r--) by the
237 <systemitem class="username">apache</systemitem> user.
238 </para>
[efe28817]239
[ab3a3af7]240 </sect2>
[08254fc]241
[ab3a3af7]242 <sect2 role="configuration">
243 <title>Configuring Apache</title>
[08254fc]244
[ab3a3af7]245 <sect3 id="apache-config">
246 <title>Config Files</title>
[08254fc]247
[6041710]248 <para>
[efe28817]249 <filename>/etc/httpd/httpd.conf</filename> and
250 <filename>/etc/httpd/extra/*</filename>
[6041710]251 </para>
[08254fc]252
[ab3a3af7]253 <indexterm zone="apache apache-config">
[efe28817]254 <primary sortas="e-etc-httpd-httpd.conf">/etc/httpd/httpd.conf</primary>
[ab3a3af7]255 </indexterm>
[08254fc]256
[ab3a3af7]257 <indexterm zone="apache apache-config">
[efe28817]258 <primary sortas="e-etc-httpd-extra-star">/etc/httpd/extra/*</primary>
[ab3a3af7]259 </indexterm>
[efe28817]260
[ab3a3af7]261 </sect3>
262
263 <sect3>
264 <title>Configuration Information</title>
265
[6041710]266 <para>
[a1083b4]267 See <ulink url="file:///usr/share/httpd/manual/configuring.html"/>
[6041710]268 for detailed instructions on customising your
269 <application>Apache</application> HTTP server configuration file.
270 </para>
[efe28817]271
[ab3a3af7]272 </sect3>
273
[f856738]274 <sect3 id="httpd-init">
[1258125]275 <title><phrase revision="sysv">Boot Script</phrase>
276 <phrase revision="systemd">Systemd Unit</phrase></title>
[ab3a3af7]277
[6041710]278 <para>
279 If you want the <application>Apache</application> server to
[efe28817]280 start automatically when the system is booted, install the
[1258125]281 <phrase revision="sysv"><filename>/etc/rc.d/init.d/httpd</filename>
282 init script</phrase>
283 <phrase revision="systemd"><filename>httpd.service</filename>
284 unit</phrase> included in the
285 <xref linkend="bootscripts" revision="sysv"/>
[3c7bd00]286 <xref linkend="systemd-units" revision="systemd"/> package.
[efe28817]287 </para>
[ab3a3af7]288
[f856738]289 <indexterm zone="apache httpd-init">
[ab3a3af7]290 <primary sortas="f-apache">apache</primary>
291 </indexterm>
292
[f856738]293<screen role="root"><userinput>make install-httpd</userinput></screen>
[4890200]294
[ab3a3af7]295 </sect3>
[4890200]296
[ab3a3af7]297 </sect2>
298
299 <sect2 role="content">
300 <title>Contents</title>
301
302 <segmentedlist>
303 <segtitle>Installed Programs</segtitle>
[c3c56b2]304 <segtitle>Installed Libraries</segtitle>
[ab3a3af7]305 <segtitle>Installed Directories</segtitle>
306
307 <seglistitem>
[6041710]308 <seg>
[0a2b9de8]309 ab, apachectl, apxs, checkgid, dbmmanage, fcgistarter,
310 htcacheclean, htdbm, htdigest, htpasswd, httpd,
[fd69a62]311 httxt2dbm, logresolve, rotatelogs, and suexec
[6041710]312 </seg>
[c3c56b2]313 <seg>
[fd69a62]314 Several libraries under /usr/lib/httpd/modules/
[c3c56b2]315 </seg>
[6041710]316 <seg>
[efe28817]317 /etc/httpd,
318 /srv/www,
319 /usr/include/httpd,
320 /usr/lib/httpd,
[fd69a62]321 /usr/share/httpd,
[0a2b9de8]322 /var/log/httpd, and
[efe28817]323 /var/run/httpd
[6041710]324 </seg>
[ab3a3af7]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>
[6041710]336 <para>
337 is a tool for benchmarking your <application>Apache</application>
338 HTTP server.
339 </para>
[ab3a3af7]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>
[6041710]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>
[ab3a3af7]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>
[6041710]363 <para>
364 is a tool for building and installing extension modules for the
365 <application>Apache</application> HTTP server.
366 </para>
[ab3a3af7]367 <indexterm zone="apache apxs">
368 <primary sortas="b-apxs">apxs</primary>
369 </indexterm>
370 </listitem>
371 </varlistentry>
372
[8961d128]373 <varlistentry id="checkgid">
374 <term><command>checkgid</command></term>
375 <listitem>
[6041710]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>
[8961d128]382 <indexterm zone="apache checkgid">
383 <primary sortas="b-checkgid">checkgid</primary>
384 </indexterm>
385 </listitem>
386 </varlistentry>
387
[de2551f]388 <varlistentry id="dbmmanage">
389 <term><command>dbmmanage</command></term>
[ab3a3af7]390 <listitem>
[6041710]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>
[de2551f]395 <indexterm zone="apache dbmmanage">
396 <primary sortas="b-dbmmanage">dbmmanage</primary>
[ab3a3af7]397 </indexterm>
398 </listitem>
399 </varlistentry>
400
[28370fe]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
[8961d128]413 <varlistentry id="htcacheclean">
414 <term><command>htcacheclean</command></term>
415 <listitem>
[6041710]416 <para>
417 is used to clean up the disk cache.
418 </para>
[8961d128]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>
[6041710]428 <para>
429 is used to manipulate the DBM password databases.
430 </para>
[8961d128]431 <indexterm zone="apache htdbm">
432 <primary sortas="b-htdbm">htdbm</primary>
433 </indexterm>
434 </listitem>
435 </varlistentry>
436
[ab3a3af7]437 <varlistentry id="htdigest">
438 <term><command>htdigest</command></term>
439 <listitem>
[6041710]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>
[ab3a3af7]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>
[6041710]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>
[ab3a3af7]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>
[6041710]466 <para>
467 is the <application>Apache</application> HTTP server program.
468 </para>
[ab3a3af7]469 <indexterm zone="apache httpd">
470 <primary sortas="b-httpd">httpd</primary>
471 </indexterm>
472 </listitem>
473 </varlistentry>
474
[8961d128]475 <varlistentry id="httxt2dbm">
476 <term><command>httxt2dbm</command></term>
[ab3a3af7]477 <listitem>
[6041710]478 <para>
479 is used to generate DBM files from text, for use in RewriteMap.
480 </para>
[8961d128]481 <indexterm zone="apache httxt2dbm">
482 <primary sortas="b-httxt2dbm">httxt2dbm</primary>
[ab3a3af7]483 </indexterm>
484 </listitem>
485 </varlistentry>
486
487 <varlistentry id="logresolve">
488 <term><command>logresolve</command></term>
489 <listitem>
[6041710]490 <para>
491 is a post-processing program to resolve IP-addresses in
492 <application>Apache</application>'s access log files.
493 </para>
[ab3a3af7]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>
[6041710]503 <para>
504 is a simple program for use in conjunction with
505 <application>Apache</application>'s piped log file feature.
506 </para>
[ab3a3af7]507 <indexterm zone="apache rotatelogs">
508 <primary sortas="b-rotatelogs">rotatelogs</primary>
509 </indexterm>
510 </listitem>
511 </varlistentry>
[efe28817]512
[28370fe]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
[ab3a3af7]525 </variablelist>
[efe28817]526
[ab3a3af7]527 </sect2>
[efe28817]528
[f45b1953]529</sect1>
Note: See TracBrowser for help on using the repository browser.