source: server/major/apache-systemd.xml@ e680d14a

systemd-11177
Last change on this file since e680d14a was e680d14a, checked in by Krejzi <krejzi@…>, 10 years ago

Checks and fixes.

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

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