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