source: server/major/apache.xml@ c3c56b2

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 c3c56b2 was c3c56b2, checked in by Krejzi <krejzi@…>, 11 years ago

Reimplement none where nothing is installed - programs, libraries or directories.

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

  • Property mode set to 100644
File size: 15.6 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
8 "http://archive.apache.org/dist/httpd/httpd-&apache-version;.tar.bz2">
9 <!ENTITY apache-download-ftp
10 "ftp://apache.mirrors.pair.com/httpd/httpd-&apache-version;.tar.bz2">
11 <!ENTITY apache-md5sum "87aaf7bc7e8715f0455997bb8c6791aa">
12 <!ENTITY apache-size "4.4 MB">
13 <!ENTITY apache-buildsize "66 MB">
14 <!ENTITY apache-time "0.7 SBU">
15]>
16
17<sect1 id="apache" xreflabel="Apache-&apache-version;">
18 <?dbhtml filename="apache.html"?>
19
20 <sect1info>
21 <othername>$LastChangedBy$</othername>
22 <date>$Date$</date>
23 </sect1info>
24
25 <title>Apache-&apache-version;</title>
26
27 <indexterm zone="apache">
28 <primary sortas="a-Apache">Apache</primary>
29 </indexterm>
30
31 <sect2 role="package">
32 <title>Introduction to Apache</title>
33
34 <para>
35 The <application>Apache</application> package contains an open-source HTTP
36 server. It is useful for creating local intranet web sites or running huge
37 web serving operations.
38 </para>
39
40 &lfs72_checked;
41
42 <bridgehead renderas="sect3">Package Information</bridgehead>
43 <itemizedlist spacing="compact">
44 <listitem>
45 <para>
46 Download (HTTP): <ulink url="&apache-download-http;"/>
47 </para>
48 </listitem>
49 <listitem>
50 <para>
51 Download (FTP): <ulink url="&apache-download-ftp;"/>
52 </para>
53 </listitem>
54 <listitem>
55 <para>
56 Download MD5 sum: &apache-md5sum;
57 </para>
58 </listitem>
59 <listitem>
60 <para>
61 Download size: &apache-size;
62 </para>
63 </listitem>
64 <listitem>
65 <para>
66 Estimated disk space required: &apache-buildsize;
67 </para>
68 </listitem>
69 <listitem>
70 <para>
71 Estimated build time: &apache-time;
72 </para>
73 </listitem>
74 </itemizedlist>
75
76 <bridgehead renderas="sect3">Apache Dependencies</bridgehead>
77
78 <bridgehead renderas="sect4">Required</bridgehead>
79 <para role="required">
80 <xref linkend="apr-util"/>
81 </para>
82
83 <bridgehead renderas="sect4">Optional</bridgehead>
84 <para role="optional">
85 <xref linkend="openldap"/>,
86 <xref linkend="db"/>,
87 <xref linkend="expat"/>,
88 <xref linkend="openssl"/>,
89 <xref linkend="pcre"/>,
90 <xref linkend="rsync"/>,
91 <xref linkend="doxygen"/>,
92 <xref linkend="lynx"/> and
93 <ulink url="http://www.distcache.org/">distcache</ulink>
94 </para>
95
96 <para condition="html" role="usernotes">
97 User Notes: <ulink url="&blfs-wiki;/apache"/>
98 </para>
99 </sect2>
100
101 <sect2 role="installation">
102 <title>Installation of Apache</title>
103
104 <para>
105 For security reasons, running the server as an unprivileged user and group
106 is strongly encouraged. Create the following group and user using the
107 following commands as <systemitem class="username">root</systemitem>:
108 </para>
109
110<screen role="root"><userinput>groupadd -g 25 apache &amp;&amp;
111useradd -c "Apache Server" -d /dev/null -g apache \
112 -s /bin/false -u 25 apache</userinput></screen>
113
114 <note>
115 <para>
116 The above command directs the <application>Apache</application> user's
117 home directory to <filename>/dev/null</filename>. This may not work
118 for some add-ons such as
119 <ulink url='http://www.viewvc.org/'><application>ViewVC</application></ulink>,
120 a browser interface for CVS and Subversion version control repositories.
121 See the User Notes for details for specific applications.
122 </para>
123 </note>
124
125 <para>
126 Build and install <application>Apache</application> by running the
127 following commands:
128 </para>
129
130<screen><userinput>cat &gt;&gt; config.layout &lt;&lt; "HERE_DOC" &amp;&amp;
131# BLFS FHS layout
132&lt;Layout FHS&gt;
133 prefix: /usr
134 exec_prefix: ${prefix}
135 bindir: ${exec_prefix}/bin
136 sbindir: ${exec_prefix}/sbin
137 libdir: ${exec_prefix}/lib
138 libexecdir: ${exec_prefix}/libexec/apache
139 mandir: ${prefix}/share/man
140 sysconfdir: /etc/apache
141 datadir: /srv/www
142 installbuilddir: ${libexecdir}/build
143 errordir: ${datadir}/error
144 iconsdir: ${datadir}/icons
145 htdocsdir: ${datadir}/htdocs
146 manualdir: ${datadir}/manual
147 cgidir: ${datadir}/cgi-bin
148 includedir: ${prefix}/include/apache
149 localstatedir: ${datadir}
150 runtimedir: /var/run
151 logfiledir: /var/log/apache
152 proxycachedir: /var/cache/apache/proxy
153&lt;/Layout&gt;
154HERE_DOC
155./configure --enable-layout=FHS --enable-mods-shared=all &amp;&amp;
156make</userinput></screen>
157
158 <para>
159 This package does not come with a test suite.
160 </para>
161
162 <para>
163 Now, as the <systemitem class="username">root</systemitem> user:
164 </para>
165
166<screen role="root"><userinput>make install &amp;&amp;
167
168chown -v root:root /usr/bin/{apxs,dbmmanage} \
169 /usr/sbin/{apachectl,envvars{,-std}} \
170 /usr/libexec/apache/httpd.exp \
171 /usr/share/man/man1/{ab,apxs,dbmmanage,ht{dbm,digest,passwd,txt2dbm},logresolve}.1 \
172 /usr/share/man/man8/{apachectl,htcacheclean,httpd,rotatelogs,suexec}.8 &amp;&amp;
173
174chown -v -R apache:apache /srv/www</userinput></screen>
175
176 <para>
177 Also as the <systemitem class="username">root</systemitem> user,
178 optionally install the html docs:
179 </para>
180
181<screen role="root"><userinput>mkdir -p /usr/share/doc/httpd-&apache-version;/style &amp;&amp;
182for thing in docs/manual/*.html.en
183do
184 tmp=${thing%.en}
185 cp ${thing} /usr/share/doc/httpd-&apache-version;/${tmp##*/}
186done
187
188cp -rf docs/manual/images /usr/share/doc/httpd-&apache-version; &amp;&amp;
189cp -rf docs/manual/style/css /usr/share/doc/httpd-&apache-version;/style &amp;&amp;
190
191for directory in developer faq howto misc mod platform programs rewrite ssl vhosts
192do
193 mkdir -p /usr/share/doc/httpd-&apache-version;/${directory}
194 for thing in docs/manual/${directory}/*.html.en
195 do
196 tmp=${thing%.en}
197 cp ${thing} /usr/share/doc/httpd-&apache-version;/${directory}/${tmp##*/}
198 done
199done
200
201sed -i \
202 '/developer\|faq\|misc\|mod\|programs\|rewrite\|ssl\|vhosts/s#/"#/index.html"#' \
203 /usr/share/doc/httpd-&apache-version;/index.html</userinput></screen>
204 </sect2>
205
206 <sect2 role="commands">
207 <title>Command Explanations</title>
208
209 <para>
210 <parameter>--enable-mods-shared=all</parameter>: The modules should be
211 compiled and used as Dynamic Shared Objects (DSOs) so they can be included
212 and excluded from the server using the run-time configuration directives.
213 </para>
214
215 <para>
216 <command>chown root:root ...</command>: This command changes the ownership
217 of some installed files, the result of building the package as a user
218 other than <systemitem class="username">root</systemitem>.
219 </para>
220
221 <para>
222 <command>chown -R apache:apache /srv/www</command>: By default, the
223 installation process installs files (documentation, error messages,
224 default icons, etc.) with the ownership of the user that extracted the
225 files from the tar file. If you want to change the ownership to another
226 user, you should do so at this point. The only requirement is that the
227 document directories need to be accessible by the <command>httpd</command>
228 process with (r-x) permissions and files need to be readable (r--) by the
229 <systemitem class="username">apache</systemitem> user.
230 </para>
231 </sect2>
232
233 <sect2 role="configuration">
234 <title>Configuring Apache</title>
235
236 <sect3 id="apache-config">
237 <title>Config Files</title>
238
239 <para>
240 <filename>/etc/apache/*</filename>
241 </para>
242
243 <indexterm zone="apache apache-config">
244 <primary sortas="e-etc-apache">/etc/apache/*</primary>
245 </indexterm>
246
247 <indexterm zone="apache apache-config">
248 <primary sortas="e-etc-apache-httpd.conf">/etc/apache/httpd.conf</primary>
249 </indexterm>
250 </sect3>
251
252 <sect3>
253 <title>Configuration Information</title>
254
255 <para>
256 The main configuration file is named
257 <filename>/etc/apache/httpd.conf</filename>. Modify it so that the HTTP
258 server runs as the dedicated user and group:
259 </para>
260
261<screen role="root"><userinput>sed -i "s/daemon$/apache/" /etc/apache/httpd.conf</userinput></screen>
262
263 <para>
264 See <ulink url="/usr/share/doc/httpd-&apache-version;/configuring.html"/>
265 for detailed instructions on customising your
266 <application>Apache</application> HTTP server configuration file.
267 </para>
268 </sect3>
269
270 <sect3 id="httpd-init">
271 <title>Boot Script</title>
272
273 <para>
274 If you want the <application>Apache</application> server to
275 start automatically when the system is booted, install the
276 <filename>/etc/rc.d/init.d/httpd</filename> init script included
277 in the <xref linkend="bootscripts"/> package.
278 </para>
279
280 <indexterm zone="apache httpd-init">
281 <primary sortas="f-apache">apache</primary>
282 </indexterm>
283
284<screen role="root"><userinput>make install-httpd</userinput></screen>
285 </sect3>
286 </sect2>
287
288 <sect2 role="content">
289 <title>Contents</title>
290
291 <segmentedlist>
292 <segtitle>Installed Programs</segtitle>
293 <segtitle>Installed Libraries</segtitle>
294 <segtitle>Installed Directories</segtitle>
295
296 <seglistitem>
297 <seg>
298 ab, apachectl, apxs, checkgid, dbmmanage, htcacheclean, htdbm,
299 htdigest, htpasswd, httpd, httxt2dbm, logresolve and rotatelogs
300 </seg>
301 <seg>
302 None
303 </seg>
304 <seg>
305 /etc/apache, /srv/www, /usr/include/apache, /usr/libexec/apache,
306 and /var/log/apache.
307 </seg>
308 </seglistitem>
309 </segmentedlist>
310
311 <variablelist>
312 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
313 <?dbfo list-presentation="list"?>
314 <?dbhtml list-presentation="table"?>
315
316 <varlistentry id="ab">
317 <term><command>ab</command></term>
318 <listitem>
319 <para>
320 is a tool for benchmarking your <application>Apache</application>
321 HTTP server.
322 </para>
323 <indexterm zone="apache ab">
324 <primary sortas="b-ab">ab</primary>
325 </indexterm>
326 </listitem>
327 </varlistentry>
328
329 <varlistentry id="apachectl">
330 <term><command>apachectl</command></term>
331 <listitem>
332 <para>
333 is a front end to the <application>Apache</application> HTTP server
334 which is designed to help the administrator control the functioning
335 of the <application>Apache</application> httpd daemon.
336 </para>
337 <indexterm zone="apache apachectl">
338 <primary sortas="b-apachectl">apachectl</primary>
339 </indexterm>
340 </listitem>
341 </varlistentry>
342
343 <varlistentry id="apxs">
344 <term><command>apxs</command></term>
345 <listitem>
346 <para>
347 is a tool for building and installing extension modules for the
348 <application>Apache</application> HTTP server.
349 </para>
350 <indexterm zone="apache apxs">
351 <primary sortas="b-apxs">apxs</primary>
352 </indexterm>
353 </listitem>
354 </varlistentry>
355
356 <varlistentry id="checkgid">
357 <term><command>checkgid</command></term>
358 <listitem>
359 <para>
360 is a program that checks whether it can setgid to the group
361 specified. This is to see if it is a valid group for Apache2 to use
362 at runtime. If the user (should be run as superuser) is in that
363 group, or can setgid to it, it will return 0.
364 </para>
365 <indexterm zone="apache checkgid">
366 <primary sortas="b-checkgid">checkgid</primary>
367 </indexterm>
368 </listitem>
369 </varlistentry>
370
371 <varlistentry id="dbmmanage">
372 <term><command>dbmmanage</command></term>
373 <listitem>
374 <para>
375 is used to create and update the DBM format files used to store
376 usernames and passwords for basic authentication of HTTP users.
377 </para>
378 <indexterm zone="apache dbmmanage">
379 <primary sortas="b-dbmmanage">dbmmanage</primary>
380 </indexterm>
381 </listitem>
382 </varlistentry>
383
384 <varlistentry id="htcacheclean">
385 <term><command>htcacheclean</command></term>
386 <listitem>
387 <para>
388 is used to clean up the disk cache.
389 </para>
390 <indexterm zone="apache htcacheclean">
391 <primary sortas="b-htcacheclean">htcacheclean</primary>
392 </indexterm>
393 </listitem>
394 </varlistentry>
395
396 <varlistentry id="htdbm">
397 <term><command>htdbm</command></term>
398 <listitem>
399 <para>
400 is used to manipulate the DBM password databases.
401 </para>
402 <indexterm zone="apache htdbm">
403 <primary sortas="b-htdbm">htdbm</primary>
404 </indexterm>
405 </listitem>
406 </varlistentry>
407
408 <varlistentry id="htdigest">
409 <term><command>htdigest</command></term>
410 <listitem>
411 <para>
412 is used to create and update the flat-files used to store usernames,
413 realms and passwords for digest authentication of HTTP users.
414 </para>
415 <indexterm zone="apache htdigest">
416 <primary sortas="b-htdigest">htdigest</primary>
417 </indexterm>
418 </listitem>
419 </varlistentry>
420
421 <varlistentry id="htpasswd">
422 <term><command>htpasswd</command></term>
423 <listitem>
424 <para>
425 is used to create and update the flat-files used to store usernames
426 and passwords for basic authentication of HTTP users.
427 </para>
428 <indexterm zone="apache htpasswd">
429 <primary sortas="b-htpasswd">htpasswd</primary>
430 </indexterm>
431 </listitem>
432 </varlistentry>
433
434 <varlistentry id="httpd">
435 <term><command>httpd</command></term>
436 <listitem>
437 <para>
438 is the <application>Apache</application> HTTP server program.
439 </para>
440 <indexterm zone="apache httpd">
441 <primary sortas="b-httpd">httpd</primary>
442 </indexterm>
443 </listitem>
444 </varlistentry>
445
446 <varlistentry id="httxt2dbm">
447 <term><command>httxt2dbm</command></term>
448 <listitem>
449 <para>
450 is used to generate DBM files from text, for use in RewriteMap.
451 </para>
452 <indexterm zone="apache httxt2dbm">
453 <primary sortas="b-httxt2dbm">httxt2dbm</primary>
454 </indexterm>
455 </listitem>
456 </varlistentry>
457
458 <varlistentry id="logresolve">
459 <term><command>logresolve</command></term>
460 <listitem>
461 <para>
462 is a post-processing program to resolve IP-addresses in
463 <application>Apache</application>'s access log files.
464 </para>
465 <indexterm zone="apache logresolve">
466 <primary sortas="b-logresolve">logresolve</primary>
467 </indexterm>
468 </listitem>
469 </varlistentry>
470
471 <varlistentry id="rotatelogs">
472 <term><command>rotatelogs</command></term>
473 <listitem>
474 <para>
475 is a simple program for use in conjunction with
476 <application>Apache</application>'s piped log file feature.
477 </para>
478 <indexterm zone="apache rotatelogs">
479 <primary sortas="b-rotatelogs">rotatelogs</primary>
480 </indexterm>
481 </listitem>
482 </varlistentry>
483 </variablelist>
484 </sect2>
485</sect1>
Note: See TracBrowser for help on using the repository browser.