source: server/major/apache.xml@ 51d044f

systemd-13485
Last change on this file since 51d044f was 51d044f, checked in by DJ Lucas <dj@…>, 8 years ago

Remainder of -systemd.xml cleanup.

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/branches/systemd@16882 af4574ff-66df-0310-9fd7-8a98e5e911e0

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