source: server/major/apache.xml@ b5b9045

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 6.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 b5b9045 was b5b9045, checked in by Igor Živković <igor@…>, 19 years ago

Added a test suite note to Apache.

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

  • Property mode set to 100644
File size: 11.2 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 "94f3a793fb1665365724943206cce23f">
10 <!ENTITY apache-size "5.0 MB">
11 <!ENTITY apache-buildsize "91.6 MB">
12 <!ENTITY apache-time "1.69 SBU">
13]>
14
15<sect1 id="apache" xreflabel="Apache-&apache-version;">
16<sect1info>
17<othername>$LastChangedBy$</othername>
18<date>$Date$</date>
19</sect1info>
20<?dbhtml filename="apache.html"?>
21<title>Apache-&apache-version;</title>
22<indexterm zone="apache">
23<primary sortas="a-Apache">Apache</primary></indexterm>
24
25<sect2>
26<title>Introduction to <application>Apache</application></title>
27
28<para>The <application>Apache</application> package contains an
29open-source <acronym>HTTP</acronym> server. It is useful for creating local
30intranet web sites or running huge web serving operations.</para>
31
32<sect3><title>Package information</title>
33<itemizedlist spacing='compact'>
34<listitem><para>Download (HTTP):
35<ulink url="&apache-download-http;"/></para></listitem>
36<listitem><para>Download (FTP):
37<ulink url="&apache-download-ftp;"/></para></listitem>
38<listitem><para>Download MD5 sum: &apache-md5sum;</para></listitem>
39<listitem><para>Download size: &apache-size;</para></listitem>
40<listitem><para>Estimated disk space required:
41&apache-buildsize;</para></listitem>
42<listitem><para>Estimated build time: &apache-time;</para></listitem>
43</itemizedlist>
44</sect3>
45
46<sect3><title>Additional downloads</title>
47<itemizedlist spacing='compact'>
48<listitem><para>Required patch: <ulink
49url="&patch-root;/httpd-&apache-version;-config-1.patch"/></para></listitem>
50</itemizedlist></sect3>
51
52<sect3><title><application>Apache</application> dependencies</title>
53<sect4><title>Optional</title>
54<para><xref linkend="db"/> or <xref linkend="gdbm"/>,
55<xref linkend="openssl"/>,
56<xref linkend="openldap"/>,
57<xref linkend="expat"/> and
58<xref linkend="doxygen"/></para>
59</sect4>
60</sect3>
61
62</sect2>
63
64<sect2>
65<title>Installation of <application>Apache</application></title>
66
67<para>For security reasons, running the server as an unprivileged user and
68group is strongly encouraged. Create the following group and user using the
69following commands (as root):</para>
70
71<screen><userinput><command>groupadd apache &amp;&amp;
72useradd -c "Apache Server" -d /dev/null -g apache -s /bin/false apache</command></userinput></screen>
73
74<para>The following patch will define the layout of destination directories
75and, among them, the build directory at
76<filename class="directory">/usr/lib/apache/build</filename>. This
77will allow the modules added to <application>Apache</application> to
78be configured without errors. Apply the patch:</para>
79
80<screen><userinput><command>patch -Np1 -i ../httpd-&apache-version;-config-1.patch</command></userinput></screen>
81
82<para>Build and install <application>Apache</application> by running the
83following commands:</para>
84
85<screen><userinput><command>./configure --enable-layout=FHS --enable-mods-shared=all &amp;&amp;
86make</command></userinput></screen>
87
88<para>This package does not come with a test suite.</para>
89
90<para>Now, as the root user:</para>
91
92<screen><userinput role='root'><command>make install &amp;&amp;
93chown root:root /usr/sbin/{apxs,apachectl,dbmmanage,envvars-std,envvars} \
94 /usr/include/apache/* /usr/lib/apache/httpd.exp \
95 /usr/share/man/man1/{dbmmanage,htdigest,htpasswd}.1 \
96 /usr/share/man/man8/{ab,apachectl,apxs,httpd}.8 \
97 /usr/share/man/man8/{logresolve,rotatelogs,suexec}.8 &amp;&amp;
98chown -R apache:apache /srv/www</command></userinput></screen>
99
100</sect2>
101
102<sect2>
103<title>Command explanations</title>
104
105<para><option>--with-expat=/usr</option>: Uses system installed
106<application>expat</application>. <emphasis>If you have installed
107<application>expat</application> and do not use this switch, the
108<application>Apache</application> installation may overwrite some files from
109the <application>expat</application> installation.</emphasis></para>
110
111<para><parameter>--enable-mods-shared=all</parameter>: The modules should be
112compiled and used as Dynamic Shared Objects
113(<acronym>DSO</acronym>s) so they can be included and excluded from the
114server using the run-time configuration directives.</para>
115
116<para><option>--enable-ssl</option>: Use this switch
117to create the <filename class="libraryfile">mod_ssl</filename>
118module and enable <acronym>SSL</acronym> support.</para>
119
120<para><command>chown root:root ...</command>: This command changes
121the ownership of some installed files, the result of building the package as a
122user other than root.</para>
123
124<para><command>chown -R apache:apache /srv/www</command>: By default, the
125installation process installs files (documentation, error messages, default
126icons, etc.) with the ownership of the user that extracted the files from the
127tar file. If you want to change the ownership to another user, you should do
128so at this point. The only requirement is that the document directories need
129to be accessible by the <command>httpd</command> process with (r-x) permissions
130and files need to be readable (r--) by the apache user.</para>
131
132</sect2>
133
134<sect2>
135<title>Configuring <application>Apache</application></title>
136
137<sect3 id="apache-config">
138<title>Config files</title>
139
140<para><filename>/etc/apache/*</filename></para>
141<indexterm zone="apache apache-config">
142<primary sortas="e-etc-apache">/etc/apache/*</primary></indexterm>
143<indexterm zone="apache apache-config">
144<primary sortas="e-etc-apache-httpd.conf">/etc/apache/httpd.conf</primary>
145</indexterm>
146</sect3>
147
148<sect3>
149<title>Configuration Information</title>
150
151<para>The main configuration file is named <filename>httpd.conf</filename>.
152Modify it to run the server as a dedicated user:</para>
153
154<screen><userinput><command>sed -i -e "s%User nobody%User apache%" \
155 -e "s%^Group #-1%Group apache%" \
156 /etc/apache/httpd.conf</command></userinput></screen>
157
158<para>See <ulink url="http://httpd.apache.org/docs-2.0/configuring.html"/> for
159detailed instructions on customizing your <application>Apache</application>
160<acronym>HTTP</acronym> server.</para>
161
162<para>There's a problem with the ISAPI <acronym>DSO</acronym> module
163caused from compiling with
164<application><acronym>GCC</acronym></application>-&gcc-version;. Comment out
165the module from the configuration file with the following command:</para>
166
167<screen><userinput><command>sed -i -e "s/^LoadModule isapi_module/# &amp;/" \
168 /etc/apache/httpd.conf</command></userinput></screen>
169
170<para id="apache-init">If you want the <application>Apache</application>
171server to start automatically when the system is booted, install the
172<filename>/etc/rc.d/init.d/apache</filename> init script included in the
173<xref linkend="intro-important-bootscripts"/> package.</para>
174<indexterm zone="apache apache-init">
175<primary sortas="f-apache">apache</primary></indexterm>
176
177<screen><userinput><command>make install-apache</command></userinput></screen>
178</sect3>
179
180</sect2>
181
182<sect2>
183<title>Contents</title>
184
185<segmentedlist>
186<segtitle>Installed Programs</segtitle>
187<segtitle>Installed Libraries</segtitle>
188<segtitle>Installed Directories</segtitle>
189<seglistitem>
190<seg>ab, apachectl, apr-config, apu-config, apxs, checkgid, dbmmanage, htdbm,
191htdigest, htpasswd, httpd, instdso.sh, logresolve and rotatelogs</seg>
192<seg>libapr-0.[so,a], libaprutil-0.[so,a] and /usr/lib/apache/*.so</seg>
193<seg>/etc/apache, /srv/www, /usr/include/apache, /usr/lib/apache and
194/var/log/apache</seg>
195</seglistitem>
196</segmentedlist>
197
198<variablelist>
199<bridgehead renderas="sect3">Short Descriptions</bridgehead>
200<?dbfo list-presentation="list"?>
201
202<varlistentry id="ab">
203<term><command>ab</command></term>
204<listitem><para>is a tool for benchmarking your
205<application>Apache</application> <acronym>HTTP</acronym> server.</para>
206<indexterm zone="apache ab">
207<primary sortas="b-ab">ab</primary></indexterm>
208</listitem>
209</varlistentry>
210
211<varlistentry id="apachectl">
212<term><command>apachectl</command></term>
213<listitem><para>is a front end to the <application>Apache</application>
214<acronym>HTTP</acronym> server which is designed to help the administrator
215control the functioning of the <application>Apache</application> httpd
216daemon.</para>
217<indexterm zone="apache apachectl">
218<primary sortas="b-apachectl">apachectl</primary></indexterm>
219</listitem>
220</varlistentry>
221
222<varlistentry id="apxs">
223<term><command>apxs</command></term>
224<listitem><para>is a tool for building and installing extension modules for
225the <application>Apache</application> <acronym>HTTP</acronym> server.</para>
226<indexterm zone="apache apxs">
227<primary sortas="b-apxs">apxs</primary></indexterm>
228</listitem>
229</varlistentry>
230
231<varlistentry id="dbmanage">
232<term><command>dbmanage</command></term>
233<listitem><para>is used to create and update the <filename>DBM</filename>
234format files used to store usernames and passwords for basic authentication
235of <acronym>HTTP</acronym> users.</para>
236<indexterm zone="apache dbmanage">
237<primary sortas="b-dbmanage">dbmanage</primary></indexterm>
238</listitem>
239</varlistentry>
240
241<varlistentry id="htdigest">
242<term><command>htdigest</command></term>
243<listitem><para>is used to create and update the flat-files used to store
244usernames, realms and passwords for digest authentication of
245<acronym>HTTP</acronym> users.</para>
246<indexterm zone="apache htdigest">
247<primary sortas="b-htdigest">htdigest</primary></indexterm>
248</listitem>
249</varlistentry>
250
251<varlistentry id="htpasswd">
252<term><command>htpasswd</command></term>
253<listitem><para>is used to create and update the flat-files used to store
254usernames and passwords for basic authentication of <acronym>HTTP</acronym>
255users.</para>
256<indexterm zone="apache htpasswd">
257<primary sortas="b-htpasswd">htpasswd</primary></indexterm>
258</listitem>
259</varlistentry>
260
261<varlistentry id="httpd">
262<term><command>httpd</command></term>
263<listitem><para>is the <application>Apache</application>
264<acronym>HTTP</acronym> server program.</para>
265<indexterm zone="apache httpd">
266<primary sortas="b-httpd">httpd</primary></indexterm>
267</listitem>
268</varlistentry>
269
270<varlistentry id="instdso.sh">
271<term><command>instdso.sh</command></term>
272<listitem><para>is a script which installs <application>Apache</application>
273<acronym>DSO</acronym> modules.</para>
274<indexterm zone="apache instdso.sh">
275<primary sortas="b-instdso.sh">instdso.sh</primary></indexterm>
276</listitem>
277</varlistentry>
278
279<varlistentry id="logresolve">
280<term><command>logresolve</command></term>
281<listitem><para>is a post-processing program to resolve
282<acronym>IP</acronym>-addresses in <application>Apache</application>'s
283access log files.</para>
284<indexterm zone="apache logresolve">
285<primary sortas="b-logresolve">logresolve</primary></indexterm>
286</listitem>
287</varlistentry>
288
289<varlistentry id="rotatelogs">
290<term><command>rotatelogs</command></term>
291<listitem><para>is a simple program for use in conjunction with
292<application>Apache</application>'s piped log file feature.</para>
293<indexterm zone="apache rotatelogs">
294<primary sortas="b-rotatelogs">rotatelogs</primary></indexterm>
295</listitem>
296</varlistentry>
297</variablelist>
298
299</sect2>
300
301</sect1>
Note: See TracBrowser for help on using the repository browser.