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