source: server/major/apache.xml@ 608a225

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 6.2 6.2.0 6.2.0-rc1 6.2.0-rc2 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 608a225 was 608a225, checked in by Randy McMurchy <randy@…>, 18 years ago

Updated to Apache HTTPD-2.2.2

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

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