source: server/major/apache.xml@ 8f9c757e

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 7.10 7.4 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 8f9c757e was 8f9c757e, checked in by DJ Lucas <dj@…>, 14 years ago

Revert last commit...wrong update.

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@8643 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 "http://www.apache.org/dist/httpd/httpd-&apache-version;.tar.bz2"> -->
8 <!ENTITY apache-download-http "http://archive.apache.org/dist/httpd/httpd-&apache-version;.tar.bz2">
9 <!ENTITY apache-download-ftp "ftp://apache.mirrors.pair.com/httpd/httpd-&apache-version;.tar.bz2">
10 <!ENTITY apache-md5sum "016cec97337eccead2aad6a7c27f2e14">
11 <!ENTITY apache-size "4.9 MB">
12 <!ENTITY apache-buildsize "100 MB">
13 <!ENTITY apache-time "2.0 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</title>
32
33 <para>The <application>Apache</application> package contains an
34 open-source HTTP server. It is useful for creating local intranet
35 web sites or running huge web serving operations.</para>
36
37 <bridgehead renderas="sect3">Package Information</bridgehead>
38 <itemizedlist spacing="compact">
39 <listitem>
40 <para>Download (HTTP): <ulink url="&apache-download-http;"/></para>
41 </listitem>
42 <listitem>
43 <para>Download (FTP): <ulink url="&apache-download-ftp;"/></para>
44 </listitem>
45 <listitem>
46 <para>Download MD5 sum: &apache-md5sum;</para>
47 </listitem>
48 <listitem>
49 <para>Download size: &apache-size;</para>
50 </listitem>
51 <listitem>
52 <para>Estimated disk space required: &apache-buildsize;</para>
53 </listitem>
54 <listitem>
55 <para>Estimated build time: &apache-time;</para>
56 </listitem>
57 </itemizedlist>
58
59 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
60 <itemizedlist spacing='compact'>
61 <listitem>
62 <para>Required patch: <ulink
63 url="&patch-root;/httpd-&apache-version;-config-1.patch"/></para>
64 </listitem>
65 </itemizedlist>
66
67 <bridgehead renderas="sect3">Apache Dependencies</bridgehead>
68
69 <bridgehead renderas="sect4">Optional</bridgehead>
70 <para role="optional"><xref linkend="openldap"/>,
71 <xref linkend="pcre"/>,
72 <xref linkend="rsync"/>,
73 <xref linkend="lynx"/>,
74 <ulink url="http://apr.apache.org/">APR</ulink>,
75 <ulink url="http://apr.apache.org/">APR-util</ulink>, and
76 <ulink url="http://www.distcache.org/">distcache</ulink></para>
77
78 <bridgehead renderas="sect4">Optional (Only if Using the Bundled
79 APR-util)</bridgehead>
80 <para role="optional"><!-- <xref linkend="pkgconfig"/>, -->
81 <xref linkend="openssl"/>,
82 <xref linkend="expat"/>,
83 <!-- <xref linkend="gdbm"/>, -->
84 <xref linkend="db"/>,
85 <xref linkend="unixodbc"/>,
86 <xref linkend="postgresql"/>, and
87 <xref linkend="sqlite"/></para>
88
89 <para>Though you can install APR and APR-util as separate components,
90 it is recommended to use the bundled versions that come with the Apache
91 HTTPD tarball.</para>
92
93 <para condition="html" role="usernotes">User Notes:
94 <ulink url="&blfs-wiki;/apache"/></para>
95
96 </sect2>
97
98 <sect2 role="installation">
99 <title>Installation of Apache</title>
100
101 <para>For security reasons, running the server as an unprivileged user and
102 group is strongly encouraged. Create the following group and user using the
103 following commands
104 (as <systemitem class="username">root</systemitem>):</para>
105
106<screen role="root"><userinput>groupadd -g 25 apache &amp;&amp;
107useradd -c "Apache Server" -d /dev/null -g apache \
108 -s /bin/false -u 25 apache</userinput></screen>
109
110 <note><para>The above command directs the <application>Apache</application>
111 user's home directory to <filename>/dev/null</filename>. This may not work
112 for some add-ons such as <ulink
113 url='http://www.viewvc.org/'><application>ViewVC</application></ulink>, a
114 browser interface for CVS and Subversion version control repositories.
115 See the User Notes for details for specific applications.</para></note>
116
117 <para>The following patch modifies the layout of destination
118 directories and among them, the build directory at
119 <filename class="directory">/usr/lib/apache/build</filename>. This
120 will allow the modules added to <application>Apache</application>
121 to be configured without errors. Apply the patch:</para>
122
123<screen><userinput>patch -Np1 -i ../httpd-&apache-version;-config-1.patch</userinput></screen>
124
125 <note>
126 <para>You may wish to review the output from
127 <command>./configure --help</command> and include whatever parameters
128 are necessary to the <command>configure</command> command below to build
129 the modules required for your installation. There are as many as 62
130 additional parameters you can add to the <command>configure</command>
131 command to build additional modules. Some of the extra parameters which
132 aren't described or mentioned in the <parameter>--help</parameter>
133 information are listed in the <quote>Command Explanations</quote> section
134 below.</para>
135
136 <para>If you are using the bundled version of
137 <application>APR-util</application> and you are going to install
138 <application>Subversion</application> with
139 <application>Berkeley DB</application> back-end support, ensure you use
140 the parameters shown in the <quote>Command Explanations</quote> section
141 below.</para>
142
143 <para>While it is not built by default when using the following commands,
144 the ISAPI DSO module can be created by adding the <option>--enable-isapi</option>
145 option. Even the module will compile, install and load fine, the module is
146 <emphasis>only</emphasis> supported and functional in Win32
147 environments.</para>
148 </note>
149
150 <para>Build and install <application>Apache</application> by running the
151 following commands:</para>
152
153<screen><userinput>./configure --enable-layout=FHS \
154 --enable-mods-shared=all \
155 --enable-so &amp;&amp;
156make</userinput></screen>
157
158 <para>This package does not come with a test suite.</para>
159
160 <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
161
162<screen role="root"><userinput>make install &amp;&amp;
163chown -v root:root /usr/lib/apache/httpd.exp \
164 /usr/sbin/{apxs,apachectl,dbmmanage,envvars{,-std}} \
165 /usr/share/man/man1/{dbmmanage,ht{dbm,digest,passwd}}.1 \
166 /usr/share/man/man8/{ab,apachectl,apxs,htcacheclean,httpd}.8 \
167 /usr/share/man/man8/{logresolve,rotatelogs,suexec}.8 &amp;&amp;
168chown -v -R apache:apache /srv/www</userinput></screen>
169
170 </sect2>
171
172 <sect2 role="commands">
173 <title>Command Explanations</title>
174
175 <!-- This is not required any longer. Finds and uses system installed
176 version of Expat without any issues
177 <para><option>-with-expat=/usr</option>: Uses the system installed
178 <application>expat</application>. <emphasis role="strong">If you have
179 installed <application>expat</application> and do not use this switch, the
180 <application>Apache</application> installation may overwrite some files
181 from the <application>expat</application> installation.</emphasis></para>
182 -->
183
184 <para><parameter>--enable-mods-shared=all</parameter>: The modules
185 should be compiled and used as Dynamic Shared Objects
186 (DSOs) so they can be included and excluded from the
187 server using the run-time configuration directives.</para>
188
189 <para><option>--enable-ssl</option>: Use this parameter
190 to create the <filename class="libraryfile">mod_ssl</filename>
191 module and enable SSL support. This parameter is mentioned as one of many
192 parameters which can be passed to the <command>configure</command> command
193 to create additional DSO modules. Note that it really only affects the
194 APR-Util sub-package, which the HTTPD installation then uses.</para>
195
196 <para><option>--with-pcre</option>: Add this parameter to use the system
197 installed version of the <application>PCRE</application> library.</para>
198
199 <para><option>--with-z</option>: Add this parameter to use the system
200 installed version of the <application>Zlib</application> library.</para>
201
202 <para><option>--with-ldap</option>: This parameter is required if you
203 passed the <option>--enable-authnz-ldap</option> or
204 <option>--enable-ldap</option> options to <command>configure</command>
205 and enabled the <application>OpenLDAP</application> modules.</para>
206
207 <para><option>--with-dbm=db4 --with-berkeley-db</option>: Use these
208 parameters if you require <application>Berkeley DB</application> support in
209 the bundled version of <application>APR-util</application> (required for
210 <application>Berkeley DB</application> back-end support in
211 <application>Subversion</application>).</para>
212
213 <para><command>chown root:root ...</command>: This command changes the
214 ownership of some installed files, the result of building the package as
215 a user other than <systemitem class="username">root</systemitem>.</para>
216
217 <para><command>chown -R apache:apache /srv/www</command>: By default, the
218 installation process installs files (documentation, error messages, default
219 icons, etc.) with the ownership of the user that extracted the files from
220 the tar file. If you want to change the ownership to another user, you
221 should do so at this point. The only requirement is that the document
222 directories need to be accessible by the <command>httpd</command> process
223 with (r-x) permissions and files need to be readable (r--) by the
224 <systemitem class="username">apache</systemitem> user.</para>
225
226 </sect2>
227
228 <sect2 role="configuration">
229 <title>Configuring Apache</title>
230
231 <sect3 id="apache-config">
232 <title>Config Files</title>
233
234 <para><filename>/etc/apache/*</filename></para>
235
236 <indexterm zone="apache apache-config">
237 <primary sortas="e-etc-apache">/etc/apache/*</primary>
238 </indexterm>
239
240 <indexterm zone="apache apache-config">
241 <primary sortas="e-etc-apache-httpd.conf">/etc/apache/httpd.conf</primary>
242 </indexterm>
243
244 </sect3>
245
246 <sect3>
247 <title>Configuration Information</title>
248
249 <para>The main configuration file is named
250 <filename>/etc/apache/httpd.conf</filename>. Modify it so that the HTTP
251 server runs as the dedicated user and group:</para>
252
253<screen role="root"><userinput>sed -i -e "s/User daemon/User apache/" \
254 -e "s/Group daemon/Group apache/" \
255 /etc/apache/httpd.conf</userinput></screen>
256
257 <para>See <ulink url="http://httpd.apache.org/docs-2.2/configuring.html"/>
258 for detailed instructions on customizing your
259 <application>Apache</application> HTTP server configuration file.</para>
260
261<!--
262 <para>There's a problem with the ISAPI DSO module caused from compiling
263 with <application>GCC</application>-&gcc-version;. If you included the
264 parameter to build the module, comment out the module's load command
265 in the configuration file with the following command:</para>
266
267<screen role="root"><userinput>sed -i "s/^LoadModule isapi_module/# &amp;/" \
268 /etc/apache/httpd.conf</userinput></screen>
269-->
270 </sect3>
271
272 <sect3 id="apache-init">
273 <title>Boot Script</title>
274
275 <para>If you want the <application>Apache</application> server to
276 start automatically when the system is booted, install the
277 <filename>/etc/rc.d/init.d/apache</filename> init script included
278 in the <xref linkend="bootscripts"/> package.</para>
279
280 <indexterm zone="apache apache-init">
281 <primary sortas="f-apache">apache</primary>
282 </indexterm>
283
284<screen role="root"><userinput>make install-apache</userinput></screen>
285
286 </sect3>
287
288 </sect2>
289
290 <sect2 role="content">
291 <title>Contents</title>
292
293 <segmentedlist>
294 <segtitle>Installed Programs</segtitle>
295 <segtitle>Installed Libraries</segtitle>
296 <segtitle>Installed Directories</segtitle>
297
298 <seglistitem>
299 <seg>ab, apachectl, apr-config, apu-config, apxs, checkgid, dbmmanage,
300 htdbm, htdigest, htpasswd, httpd, instdso.sh, logresolve, and
301 rotatelogs</seg>
302 <seg>libapr-1.{so,a}, libaprutil-1.{so,a}, and /usr/lib/apache/*.so</seg>
303 <seg>/etc/apache, /srv/www, /usr/include/apache, /usr/lib/apache, and
304 /var/log/apache</seg>
305 </seglistitem>
306 </segmentedlist>
307
308 <variablelist>
309 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
310 <?dbfo list-presentation="list"?>
311 <?dbhtml list-presentation="table"?>
312
313 <varlistentry id="ab">
314 <term><command>ab</command></term>
315 <listitem>
316 <para>is a tool for benchmarking your
317 <application>Apache</application> HTTP server.</para>
318 <indexterm zone="apache ab">
319 <primary sortas="b-ab">ab</primary>
320 </indexterm>
321 </listitem>
322 </varlistentry>
323
324 <varlistentry id="apachectl">
325 <term><command>apachectl</command></term>
326 <listitem>
327 <para>is a front end to the <application>Apache</application>
328 HTTP server which is designed to help the administrator
329 control the functioning of the <application>Apache</application>
330 httpd daemon.</para>
331 <indexterm zone="apache apachectl">
332 <primary sortas="b-apachectl">apachectl</primary>
333 </indexterm>
334 </listitem>
335 </varlistentry>
336
337 <varlistentry id="apxs">
338 <term><command>apxs</command></term>
339 <listitem>
340 <para>is a tool for building and installing extension modules for
341 the <application>Apache</application> HTTP server.</para>
342 <indexterm zone="apache apxs">
343 <primary sortas="b-apxs">apxs</primary>
344 </indexterm>
345 </listitem>
346 </varlistentry>
347
348 <varlistentry id="dbmmanage">
349 <term><command>dbmmanage</command></term>
350 <listitem>
351 <para>is used to create and update the DBM format files used to store
352 usernames and passwords for basic authentication of HTTP users.</para>
353 <indexterm zone="apache dbmmanage">
354 <primary sortas="b-dbmmanage">dbmmanage</primary>
355 </indexterm>
356 </listitem>
357 </varlistentry>
358
359 <varlistentry id="htdigest">
360 <term><command>htdigest</command></term>
361 <listitem>
362 <para>is used to create and update the flat-files used to store
363 usernames, realms and passwords for digest authentication of
364 HTTP users.</para>
365 <indexterm zone="apache htdigest">
366 <primary sortas="b-htdigest">htdigest</primary>
367 </indexterm>
368 </listitem>
369 </varlistentry>
370
371 <varlistentry id="htpasswd">
372 <term><command>htpasswd</command></term>
373 <listitem>
374 <para>is used to create and update the flat-files used to store
375 usernames and passwords for basic authentication of HTTP users.</para>
376 <indexterm zone="apache htpasswd">
377 <primary sortas="b-htpasswd">htpasswd</primary>
378 </indexterm>
379 </listitem>
380 </varlistentry>
381
382 <varlistentry id="httpd">
383 <term><command>httpd</command></term>
384 <listitem>
385 <para>is the <application>Apache</application>
386 HTTP server program.</para>
387 <indexterm zone="apache httpd">
388 <primary sortas="b-httpd">httpd</primary>
389 </indexterm>
390 </listitem>
391 </varlistentry>
392
393 <varlistentry id="instdso.sh">
394 <term><command>instdso.sh</command></term>
395 <listitem>
396 <para>is a script which installs <application>Apache</application>
397 DSO modules.</para>
398 <indexterm zone="apache instdso.sh">
399 <primary sortas="b-instdso.sh">instdso.sh</primary>
400 </indexterm>
401 </listitem>
402 </varlistentry>
403
404 <varlistentry id="logresolve">
405 <term><command>logresolve</command></term>
406 <listitem>
407 <para>is a post-processing program to resolve IP-addresses
408 in <application>Apache</application>'s access log files.</para>
409 <indexterm zone="apache logresolve">
410 <primary sortas="b-logresolve">logresolve</primary>
411 </indexterm>
412 </listitem>
413 </varlistentry>
414
415 <varlistentry id="rotatelogs">
416 <term><command>rotatelogs</command></term>
417 <listitem>
418 <para>is a simple program for use in conjunction with
419 <application>Apache</application>'s piped log file feature.</para>
420 <indexterm zone="apache rotatelogs">
421 <primary sortas="b-rotatelogs">rotatelogs</primary>
422 </indexterm>
423 </listitem>
424 </varlistentry>
425
426 </variablelist>
427
428 </sect2>
429
430</sect1>
Note: See TracBrowser for help on using the repository browser.