source: server/major/apache.xml@ 1e642794

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

Fixed broken download URLs in the Tin, RSync, PostgreSQL, MySQL and Apache HTTPD server instructions

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