1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
|
---|
3 | "http://www.oasis-open.org/docbook/xml/4.3/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.gz">
|
---|
8 | <!ENTITY apache-download-ftp "ftp://ftp.tux.org/pub/net/apache/dist/httpd/httpd-&apache-version;.tar.gz">
|
---|
9 | <!ENTITY apache-size "5.9 MB">
|
---|
10 | <!ENTITY apache-buildsize "78 MB">
|
---|
11 | <!ENTITY apache-time "1.32 SBU">
|
---|
12 | ]>
|
---|
13 |
|
---|
14 | <sect1 id="apache" xreflabel="Apache-&apache-version;">
|
---|
15 | <sect1info>
|
---|
16 | <othername>$LastChangedBy$</othername>
|
---|
17 | <date>$Date$</date>
|
---|
18 | </sect1info>
|
---|
19 | <?dbhtml filename="apache.html"?>
|
---|
20 | <title>Apache-&apache-version;</title>
|
---|
21 |
|
---|
22 | <sect2>
|
---|
23 | <title>Introduction to <application>Apache</application></title>
|
---|
24 |
|
---|
25 | <para>The <application>Apache</application> package contains an
|
---|
26 | open-source <acronym>HTTP</acronym> server. It is
|
---|
27 | useful for creating local intranet web sites or running huge web serving
|
---|
28 | operations.</para>
|
---|
29 |
|
---|
30 | <sect3><title>Package information</title>
|
---|
31 | <itemizedlist spacing='compact'>
|
---|
32 | <listitem><para>Download (HTTP): <ulink url="&apache-download-http;"/></para></listitem>
|
---|
33 | <listitem><para>Download (FTP): <ulink url="&apache-download-ftp;"/></para></listitem>
|
---|
34 | <listitem><para>Download size: &apache-size;</para></listitem>
|
---|
35 | <listitem><para>Estimated Disk space required: &apache-buildsize;</para></listitem>
|
---|
36 | <listitem><para>Estimated build time: &apache-time;</para></listitem></itemizedlist>
|
---|
37 | </sect3>
|
---|
38 |
|
---|
39 | <sect3><title>Additional downloads</title>
|
---|
40 | <itemizedlist spacing='compact'>
|
---|
41 | <listitem><para>Required Patch: <ulink
|
---|
42 | url="&patch-root;/httpd-&apache-version;-config-2.patch"/></para></listitem>
|
---|
43 | </itemizedlist></sect3>
|
---|
44 |
|
---|
45 | <sect3><title><application>Apache</application> dependencies</title>
|
---|
46 | <sect4><title>Optional</title>
|
---|
47 | <para><xref linkend="db"/> or <xref linkend="gdbm"/>, <xref linkend="openssl"/>,
|
---|
48 | <xref linkend="openldap"/>, <xref linkend="expat"/> and
|
---|
49 | <ulink url="http://www.stack.nl/~dimitri/doxygen/">doxygen</ulink></para></sect4>
|
---|
50 | </sect3>
|
---|
51 |
|
---|
52 | </sect2>
|
---|
53 |
|
---|
54 | <sect2>
|
---|
55 | <title>Installation of <application>Apache</application></title>
|
---|
56 |
|
---|
57 | <para>For security reasons, running the server as an unprivileged user and
|
---|
58 | group is strongly encouraged.</para>
|
---|
59 |
|
---|
60 | <screen><userinput><command>groupadd apache &&
|
---|
61 | useradd -c apache -d /dev/null -g apache -s /bin/false apache</command></userinput></screen>
|
---|
62 |
|
---|
63 | <para>The following patch will define the layout of destination directories
|
---|
64 | and, among them, the build directory at
|
---|
65 | <filename class="directory">/usr/lib/apache/build</filename>. This
|
---|
66 | will allow the modules added to <application>Apache</application> to
|
---|
67 | be configured without errors. Apply the patch:</para>
|
---|
68 |
|
---|
69 | <screen><userinput><command>patch -Np1 -i ../httpd-&apache-version;-config-2.patch</command></userinput></screen>
|
---|
70 |
|
---|
71 | <para>Build and install <application>Apache</application> by running the
|
---|
72 | following commands:</para>
|
---|
73 |
|
---|
74 | <screen><userinput><command>./configure --enable-layout=FHS \
|
---|
75 | --enable-mods-shared=all &&
|
---|
76 | make &&
|
---|
77 | make install</command></userinput></screen>
|
---|
78 |
|
---|
79 | </sect2>
|
---|
80 |
|
---|
81 | <sect2>
|
---|
82 | <title>Command explanations</title>
|
---|
83 |
|
---|
84 | <para><parameter>--with-expat=/usr</parameter>: Uses system installed
|
---|
85 | expat. <emphasis>If you have installed expat and do not use this switch, the
|
---|
86 | apache installation may overwrite some files from the expat
|
---|
87 | installation.</emphasis></para>
|
---|
88 |
|
---|
89 | <para><parameter>--enable-mods-shared=all</parameter>: We want modules
|
---|
90 | to be compiled and used as Dynamic Shared Objects
|
---|
91 | (<acronym>DSO</acronym>s) so they can be included and excluded from the
|
---|
92 | server using the run-time configuration directives.</para>
|
---|
93 |
|
---|
94 | <para><option>--enable-ssl</option>: Use this switch
|
---|
95 | to create the <filename class="libraryfile">mod_ssl</filename>
|
---|
96 | module and enable <acronym>SSL</acronym> support.</para>
|
---|
97 |
|
---|
98 | </sect2>
|
---|
99 |
|
---|
100 | <sect2>
|
---|
101 | <title>Configuring <application>Apache</application></title>
|
---|
102 |
|
---|
103 | <sect3>
|
---|
104 | <title>Config files</title>
|
---|
105 |
|
---|
106 | <para><filename>/etc/apache/*</filename></para>
|
---|
107 |
|
---|
108 | </sect3>
|
---|
109 |
|
---|
110 | <sect3><title>Configuration Information</title>
|
---|
111 |
|
---|
112 | <para>The main configuration file is called
|
---|
113 | <filename>httpd.conf</filename>. Modify it to run the server as a
|
---|
114 | dedicated user:</para>
|
---|
115 |
|
---|
116 | <screen><userinput><command>sed -i -e "s%User nobody%User apache%" -e "s%^Group #-1%Group apache%" /etc/apache/httpd.conf</command></userinput></screen>
|
---|
117 |
|
---|
118 | <para>See
|
---|
119 | <ulink url="http://httpd.apache.org/docs-2.0/configuring.html"/> for
|
---|
120 | detailed instructions on customizing your Apache <acronym>HTTP</acronym>
|
---|
121 | server.</para>
|
---|
122 |
|
---|
123 | <para>Install the <filename>/etc/rc.d/init.d/apache</filename>
|
---|
124 | init script included in the <xref linkend="intro-important-bootscripts"/>
|
---|
125 | package.</para>
|
---|
126 |
|
---|
127 | <screen><userinput><command>make install-apache</command></userinput></screen>
|
---|
128 |
|
---|
129 | </sect3>
|
---|
130 |
|
---|
131 | </sect2>
|
---|
132 |
|
---|
133 | <sect2>
|
---|
134 | <title>Contents</title>
|
---|
135 |
|
---|
136 | <para>The <application>Apache</application> package provides
|
---|
137 | <command>ab</command>,
|
---|
138 | <command>apachectl</command>,
|
---|
139 | <command>apr-config</command>,
|
---|
140 | <command>apu-config</command>,
|
---|
141 | <command>apxs</command>,
|
---|
142 | <command>checkgid</command>,
|
---|
143 | <command>dbmmanage</command>,
|
---|
144 | <command>htdbm</command>,
|
---|
145 | <command>htdigest</command>,
|
---|
146 | <command>htpasswd</command>,
|
---|
147 | <command>httpd</command>,
|
---|
148 | <command>instdso.sh</command>,
|
---|
149 | <command>logresolve</command>,
|
---|
150 | <command>rotatelogs</command>,
|
---|
151 | <filename class="libraryfile">libapr</filename>,
|
---|
152 | <filename class="libraryfile">libaprutil</filename> and
|
---|
153 | various modules.</para>
|
---|
154 | </sect2>
|
---|
155 |
|
---|
156 | <sect2><title>Description</title>
|
---|
157 |
|
---|
158 | <sect3><title>ab</title>
|
---|
159 | <para><command>ab</command> is a tool for benchmarking your
|
---|
160 | <application>Apache</application> <acronym>HTTP</acronym> server.
|
---|
161 | </para></sect3>
|
---|
162 |
|
---|
163 | <sect3><title>apachectl</title>
|
---|
164 | <para><command>apachectl</command> is a front end to the
|
---|
165 | <application>Apache</application> <acronym>HTTP</acronym>
|
---|
166 | server which is designed to help the administrator control the
|
---|
167 | functioning of the <application>Apache</application> httpd daemon.</para></sect3>
|
---|
168 |
|
---|
169 | <sect3><title>apxs</title>
|
---|
170 | <para><command>apxs</command>
|
---|
171 | is a tool for building and installing extension modules for the
|
---|
172 | <application>Apache</application> <acronym>HTTP</acronym> server.</para></sect3>
|
---|
173 |
|
---|
174 | <sect3><title>dbmmanage</title>
|
---|
175 | <para><command>dbmmanage</command> is used to create and update the
|
---|
176 | <filename>DBM</filename> format files used to store usernames and passwords
|
---|
177 | for basic authentication of <acronym>HTTP</acronym>
|
---|
178 | users.</para></sect3>
|
---|
179 |
|
---|
180 | <sect3><title>htdigest</title>
|
---|
181 | <para><command>htdigest</command> is used to create and update the
|
---|
182 | flat-files used to store usernames, realms and passwords for digest
|
---|
183 | authentication of <acronym>HTTP</acronym> users.</para></sect3>
|
---|
184 |
|
---|
185 | <sect3><title>htpasswd</title>
|
---|
186 | <para><command>htpasswd</command> is used to create and update the
|
---|
187 | flat-files used to store usernames and passwords for basic authentication of
|
---|
188 | <acronym>HTTP</acronym> users.</para></sect3>
|
---|
189 |
|
---|
190 | <sect3><title>httpd</title>
|
---|
191 | <para><command>httpd</command> is the <application>Apache</application>
|
---|
192 | <acronym>HTTP</acronym> server program.</para></sect3>
|
---|
193 |
|
---|
194 | <sect3><title>instdso.sh</title>
|
---|
195 | <para><command>instdso.sh</command> is a script which installs
|
---|
196 | <application>Apache</application> <acronym>DSO</acronym> modules.</para></sect3>
|
---|
197 |
|
---|
198 | <sect3><title>logresolve</title>
|
---|
199 | <para><command>logresolve</command> is a post-processing program to
|
---|
200 | resolve <acronym>IP</acronym>-addresses in <application>Apache</application>'s
|
---|
201 | access log files.</para></sect3>
|
---|
202 |
|
---|
203 | <sect3><title>rotatelogs</title>
|
---|
204 | <para><command>rotatelogs</command> is a simple program for use in conjunction
|
---|
205 | with <application>Apache</application>'s piped log file feature.</para></sect3>
|
---|
206 |
|
---|
207 | </sect2>
|
---|
208 |
|
---|
209 | </sect1>
|
---|