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