source: server/major/apache.xml@ 68c04ad

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 7.10 7.5 7.6 7.6-blfs 7.6-systemd 7.7 7.8 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind gnome kde5-13430 kde5-14269 kde5-14686 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts krejzi/svn lazarus lxqt nosym perl-modules plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition systemd-11177 systemd-13485 trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 68c04ad was 68c04ad, checked in by Pierre Labastie <pieere@…>, 10 years ago

Fix apxs so that it may use absolute paths when installing apache modules

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

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