source: server/major/apache-systemd.xml@ 22faf254

7.6-blfs 7.6-systemd kde5-14686 systemd-13485
Last change on this file since 22faf254 was b8c3180, 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
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
[efe28817]8 "http://archive.apache.org/dist/httpd/httpd-&apache-version;.tar.bz2">
[4890200]9 <!ENTITY apache-download-ftp " ">
[82f15d2]10 <!ENTITY apache-md5sum "44543dff14a4ebc1e9e2d86780507156">
11 <!ENTITY apache-size "4.9 MB">
12 <!ENTITY apache-buildsize "94 MB">
[6ad92d5f]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
[b8c3180]39 &lfs76_checked;
[20e6cade]40
[ab3a3af7]41 <bridgehead renderas="sect3">Package Information</bridgehead>
42 <itemizedlist spacing="compact">
43 <listitem>
[6041710]44 <para>
45 Download (HTTP): <ulink url="&apache-download-http;"/>
46 </para>
[ab3a3af7]47 </listitem>
48 <listitem>
[6041710]49 <para>
50 Download (FTP): <ulink url="&apache-download-ftp;"/>
51 </para>
[ab3a3af7]52 </listitem>
53 <listitem>
[6041710]54 <para>
55 Download MD5 sum: &apache-md5sum;
56 </para>
[ab3a3af7]57 </listitem>
58 <listitem>
[6041710]59 <para>
60 Download size: &apache-size;
61 </para>
[ab3a3af7]62 </listitem>
63 <listitem>
[6041710]64 <para>
65 Estimated disk space required: &apache-buildsize;
66 </para>
[ab3a3af7]67 </listitem>
68 <listitem>
[6041710]69 <para>
70 Estimated build time: &apache-time;
71 </para>
[3ae60ba7]72 </listitem>
[ab3a3af7]73 </itemizedlist>
74
[efe28817]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>
[ab3a3af7]86
[6041710]87 <bridgehead renderas="sect4">Required</bridgehead>
88 <para role="required">
[4049347a]89 <xref linkend="apr-util"/> and
90 <xref linkend="pcre"/>
[6041710]91 </para>
[3cb0c57]92
[efe28817]93 <bridgehead renderas="sect4">Recommended</bridgehead>
94 <para role="recommended">
95 <xref linkend="openssl"/>
96 </para>
97
[6041710]98 <bridgehead renderas="sect4">Optional</bridgehead>
99 <para role="optional">
[0d7900a]100 <xref linkend="db"/>,
[efe28817]101 <xref linkend="doxygen"/>,
[fd69a62]102 <xref linkend="libxml2"/>,
[efe28817]103 <xref linkend="lynx"/>,
[fd69a62]104 <xref linkend="openldap"/> (<xref linkend="apr-util"/> needs to be
[607c1e67]105 compiled with LDAP suport),
[6041710]106 <xref linkend="rsync"/>,
[0a2b9de8]107 <ulink url="http://www.distcache.org/">Distcache</ulink>, and
[32d4980]108 <xref linkend="lua"/>
[6041710]109 </para>
110
111 <para condition="html" role="usernotes">
112 User Notes: <ulink url="&blfs-wiki;/apache"/>
113 </para>
[ab3a3af7]114 </sect2>
115
116 <sect2 role="installation">
[efe28817]117 <title>Installation of Apache HTTPD</title>
[ab3a3af7]118
[6041710]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>
[ab3a3af7]124
[b785ab29]125<screen role="root"><userinput>groupadd -g 25 apache &amp;&amp;
[efe28817]126useradd -c "Apache Server" -d /srv/www -g apache \
[b785ab29]127 -s /bin/false -u 25 apache</userinput></screen>
[ab3a3af7]128
[6041710]129 <para>
[efe28817]130 Build and install <application>Apache HTTPD</application> by running the
[6041710]131 following commands:
132 </para>
133
[efe28817]134<screen><userinput>patch -Np1 -i ../httpd-&apache-version;-blfs_layout-1.patch &amp;&amp;
[68c04ad]135sed '/dir.*CFG_PREFIX/s@^@#@' -i support/apxs.in &amp;&amp;
[82f15d2]136./configure --enable-authnz-fcgi \
137 --enable-layout=BLFS \
[0a2b9de8]138 --enable-mods-shared="all cgi" \
139 --enable-mpms-shared=all \
[82f15d2]140 --enable-suexec=shared \
[0a2b9de8]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 \
[c2c16c9]145 --with-suexec-docroot=/srv/www \
[efe28817]146 --with-suexec-logfile=/var/log/httpd/suexec.log \
[c2c16c9]147 --with-suexec-uidmin=100 \
148 --with-suexec-userdir=public_html &amp;&amp;
[ab3a3af7]149make</userinput></screen>
150
[6041710]151 <para>
152 This package does not come with a test suite.
153 </para>
[ab3a3af7]154
[6041710]155 <para>
[607c1e67]156 Now, as the <systemitem class="username">root</systemitem> user:
[6041710]157 </para>
[ab3a3af7]158
[0a2b9de8]159<screen role="root"><userinput>make install &amp;&amp;
[63aeb2c]160
[efe28817]161mv -v /usr/sbin/suexec /usr/lib/httpd/suexec &amp;&amp;
[607c1e67]162chgrp -v apache /usr/lib/httpd/suexec &amp;&amp;
163chmod -v 4754 /usr/lib/httpd/suexec &amp;&amp;
[63aeb2c]164
[f165eea]165chown -v -R apache:apache /srv/www</userinput></screen>
[08254fc]166
[ab3a3af7]167 </sect2>
[08254fc]168
[ab3a3af7]169 <sect2 role="commands">
170 <title>Command Explanations</title>
[08254fc]171
[68c04ad]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
[82f15d2]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
[6041710]184 <para>
[efe28817]185 <parameter>--enable-mods-shared="all cgi"</parameter>: The modules should be
[6041710]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>
[efe28817]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
[0a2b9de8]215 permissions of the binary, making it setgid
[efe28817]216 <systemitem class="username">apache</systemitem>.
[6041710]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>
[efe28817]229
[ab3a3af7]230 </sect2>
[08254fc]231
[ab3a3af7]232 <sect2 role="configuration">
233 <title>Configuring Apache</title>
[08254fc]234
[ab3a3af7]235 <sect3 id="apache-config">
236 <title>Config Files</title>
[08254fc]237
[6041710]238 <para>
[efe28817]239 <filename>/etc/httpd/httpd.conf</filename> and
240 <filename>/etc/httpd/extra/*</filename>
[6041710]241 </para>
[08254fc]242
[ab3a3af7]243 <indexterm zone="apache apache-config">
[efe28817]244 <primary sortas="e-etc-httpd-httpd.conf">/etc/httpd/httpd.conf</primary>
[ab3a3af7]245 </indexterm>
[08254fc]246
[ab3a3af7]247 <indexterm zone="apache apache-config">
[efe28817]248 <primary sortas="e-etc-httpd-extra-star">/etc/httpd/extra/*</primary>
[ab3a3af7]249 </indexterm>
[efe28817]250
[ab3a3af7]251 </sect3>
252
253 <sect3>
254 <title>Configuration Information</title>
255
[6041710]256 <para>
[a1083b4]257 See <ulink url="file:///usr/share/httpd/manual/configuring.html"/>
[6041710]258 for detailed instructions on customising your
259 <application>Apache</application> HTTP server configuration file.
260 </para>
[efe28817]261
[ab3a3af7]262 </sect3>
263
[f856738]264 <sect3 id="httpd-init">
[2b27f103]265 <title>Systemd Units</title>
[ab3a3af7]266
[6041710]267 <para>
[2b27f103]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:
[efe28817]272 </para>
[ab3a3af7]273
[f856738]274 <indexterm zone="apache httpd-init">
[2b27f103]275 <primary sortas="f-httpd">httpd</primary>
[ab3a3af7]276 </indexterm>
277
[f856738]278<screen role="root"><userinput>make install-httpd</userinput></screen>
[4890200]279
[ab3a3af7]280 </sect3>
[4890200]281
[ab3a3af7]282 </sect2>
283
284 <sect2 role="content">
285 <title>Contents</title>
286
287 <segmentedlist>
288 <segtitle>Installed Programs</segtitle>
[c3c56b2]289 <segtitle>Installed Libraries</segtitle>
[ab3a3af7]290 <segtitle>Installed Directories</segtitle>
291
292 <seglistitem>
[6041710]293 <seg>
[0a2b9de8]294 ab, apachectl, apxs, checkgid, dbmmanage, fcgistarter,
295 htcacheclean, htdbm, htdigest, htpasswd, httpd,
[fd69a62]296 httxt2dbm, logresolve, rotatelogs, and suexec
[6041710]297 </seg>
[c3c56b2]298 <seg>
[607c1e67]299 None
[c3c56b2]300 </seg>
[6041710]301 <seg>
[efe28817]302 /etc/httpd,
303 /srv/www,
304 /usr/include/httpd,
305 /usr/lib/httpd,
[fd69a62]306 /usr/share/httpd,
[0a2b9de8]307 /var/log/httpd, and
[efe28817]308 /var/run/httpd
[6041710]309 </seg>
[ab3a3af7]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>
[6041710]321 <para>
322 is a tool for benchmarking your <application>Apache</application>
323 HTTP server.
324 </para>
[ab3a3af7]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>
[6041710]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>
[ab3a3af7]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>
[6041710]348 <para>
349 is a tool for building and installing extension modules for the
350 <application>Apache</application> HTTP server.
351 </para>
[ab3a3af7]352 <indexterm zone="apache apxs">
353 <primary sortas="b-apxs">apxs</primary>
354 </indexterm>
355 </listitem>
356 </varlistentry>
357
[8961d128]358 <varlistentry id="checkgid">
359 <term><command>checkgid</command></term>
360 <listitem>
[6041710]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>
[8961d128]367 <indexterm zone="apache checkgid">
368 <primary sortas="b-checkgid">checkgid</primary>
369 </indexterm>
370 </listitem>
371 </varlistentry>
372
[de2551f]373 <varlistentry id="dbmmanage">
374 <term><command>dbmmanage</command></term>
[ab3a3af7]375 <listitem>
[6041710]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>
[de2551f]380 <indexterm zone="apache dbmmanage">
381 <primary sortas="b-dbmmanage">dbmmanage</primary>
[ab3a3af7]382 </indexterm>
383 </listitem>
384 </varlistentry>
385
[8961d128]386 <varlistentry id="htcacheclean">
387 <term><command>htcacheclean</command></term>
388 <listitem>
[6041710]389 <para>
390 is used to clean up the disk cache.
391 </para>
[8961d128]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>
[6041710]401 <para>
402 is used to manipulate the DBM password databases.
403 </para>
[8961d128]404 <indexterm zone="apache htdbm">
405 <primary sortas="b-htdbm">htdbm</primary>
406 </indexterm>
407 </listitem>
408 </varlistentry>
409
[ab3a3af7]410 <varlistentry id="htdigest">
411 <term><command>htdigest</command></term>
412 <listitem>
[6041710]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>
[ab3a3af7]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>
[6041710]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>
[ab3a3af7]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>
[6041710]439 <para>
440 is the <application>Apache</application> HTTP server program.
441 </para>
[ab3a3af7]442 <indexterm zone="apache httpd">
443 <primary sortas="b-httpd">httpd</primary>
444 </indexterm>
445 </listitem>
446 </varlistentry>
447
[8961d128]448 <varlistentry id="httxt2dbm">
449 <term><command>httxt2dbm</command></term>
[ab3a3af7]450 <listitem>
[6041710]451 <para>
452 is used to generate DBM files from text, for use in RewriteMap.
453 </para>
[8961d128]454 <indexterm zone="apache httxt2dbm">
455 <primary sortas="b-httxt2dbm">httxt2dbm</primary>
[ab3a3af7]456 </indexterm>
457 </listitem>
458 </varlistentry>
459
460 <varlistentry id="logresolve">
461 <term><command>logresolve</command></term>
462 <listitem>
[6041710]463 <para>
464 is a post-processing program to resolve IP-addresses in
465 <application>Apache</application>'s access log files.
466 </para>
[ab3a3af7]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>
[6041710]476 <para>
477 is a simple program for use in conjunction with
478 <application>Apache</application>'s piped log file feature.
479 </para>
[ab3a3af7]480 <indexterm zone="apache rotatelogs">
481 <primary sortas="b-rotatelogs">rotatelogs</primary>
482 </indexterm>
483 </listitem>
484 </varlistentry>
[efe28817]485
[ab3a3af7]486 </variablelist>
[efe28817]487
[ab3a3af7]488 </sect2>
[efe28817]489
[f45b1953]490</sect1>
Note: See TracBrowser for help on using the repository browser.