source: server/major/apache.xml@ c6dc484

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 c6dc484 was c6dc484, checked in by Randy McMurchy <randy@…>, 17 years ago

Updated to Apache HTTPD-2.2.4

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

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