source: server/major/apache.xml@ 3c1f587

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 6.3 6.3-rc1 6.3-rc2 6.3-rc3 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 3c1f587 was 3c1f587, checked in by DJ Lucas <dj@…>, 16 years ago

Updated to apache-2.2.8 and minor corrections to openssl comments.

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@7303 af4574ff-66df-0310-9fd7-8a98e5e911e0

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