source: server/major/apache.xml@ 85ec85ef

gnome
Last change on this file since 85ec85ef was c463c87, checked in by Christopher Gregory <cjg@…>, 10 years ago

Removed excess white space and updated systemd instructions on svnserver autofs bluez fcron sysstat nfs-utils ntp rsync samba wpa_supplicant
avahi mariadb postgresql exim postfix apache bind proftpd vsftpd openldap unbound xinetd and clutter pages

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

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