install.html revision 091caae3b2ebdb760c98575d0d5e349cd686f913
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagher<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagher<HTML>
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagher<HEAD>
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagher<TITLE>Compiling and Installing Apache</TITLE>
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagher</HEAD>
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagher
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagher<!-- Background white, links blue (unvisited), navy (visited), red (active) -->
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagher<BODY
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagher BGCOLOR="#FFFFFF"
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagher TEXT="#000000"
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagher LINK="#0000FF"
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagher VLINK="#000080"
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagher ALINK="#FF0000"
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagher>
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagher<!--#include virtual="header.html" -->
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagher
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagher<H1 ALIGN="CENTER">Compiling and Installing Apache 1.3</H1>
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagher
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen GallagherUnixWare users will want to consult <A HREF="unixware.html">build notes</A>
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagherfor various UnixWare versions before compiling.
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagher
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagher<H2>Downloading Apache</H2>
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagher
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen GallagherInformation on the latest version of Apache can be found on the Apache
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagherweb server at <A
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen GallagherHREF="http://www.apache.org/">http://www.apache.org/</A>. This will
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagherlist the current release, any more recent beta-test release, together
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagherwith details of mirror web and anonymous ftp sites.
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagher
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagher<P>
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagher
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen GallagherIf you downloaded a binary distribution, skip to <A
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen GallagherHREF="#install">Installing Apache</A>. Otherwise read the next section
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagherfor how to compile the server.
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagher
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagher<H2>Compiling Apache</H2>
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagher
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen GallagherCompiling Apache consists of three steps: Firstly select which Apache
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagher<STRONG>modules</STRONG> you want to include into the server. Secondly create a
949fbc93defad394648b2651b43a7bbfa5bff42bSumit Boseconfiguration for your operating system. Thirdly compile the
949fbc93defad394648b2651b43a7bbfa5bff42bSumit Boseexecutable.
949fbc93defad394648b2651b43a7bbfa5bff42bSumit Bose<P>
949fbc93defad394648b2651b43a7bbfa5bff42bSumit Bose
949fbc93defad394648b2651b43a7bbfa5bff42bSumit BoseAll configuration of Apache is performed in the <CODE>src</CODE>
949fbc93defad394648b2651b43a7bbfa5bff42bSumit Bosedirectory of the Apache distribution. Change into this directory.
949fbc93defad394648b2651b43a7bbfa5bff42bSumit Bose
949fbc93defad394648b2651b43a7bbfa5bff42bSumit Bose<OL>
949fbc93defad394648b2651b43a7bbfa5bff42bSumit Bose <LI>
949fbc93defad394648b2651b43a7bbfa5bff42bSumit Bose Select modules to compile into Apache in the
949fbc93defad394648b2651b43a7bbfa5bff42bSumit Bose <CODE>Configuration</CODE> file. Uncomment lines corresponding to
949fbc93defad394648b2651b43a7bbfa5bff42bSumit Bose those optional modules you wish to include (among the AddModule lines
949fbc93defad394648b2651b43a7bbfa5bff42bSumit Bose at the bottom of the file), or add new lines corresponding to
949fbc93defad394648b2651b43a7bbfa5bff42bSumit Bose additional modules you have downloaded or written. (See <A
949fbc93defad394648b2651b43a7bbfa5bff42bSumit Bose HREF="misc/API.html">API.html</A> for preliminary docs on how to
949fbc93defad394648b2651b43a7bbfa5bff42bSumit Bose write Apache modules). Advanced users can comment out some of the
949fbc93defad394648b2651b43a7bbfa5bff42bSumit Bose default modules if they are sure they will not need them (be careful
949fbc93defad394648b2651b43a7bbfa5bff42bSumit Bose though, since many of the default modules are vital for the correct
949fbc93defad394648b2651b43a7bbfa5bff42bSumit Bose operation and security of the server).
949fbc93defad394648b2651b43a7bbfa5bff42bSumit Bose <P>
949fbc93defad394648b2651b43a7bbfa5bff42bSumit Bose
949fbc93defad394648b2651b43a7bbfa5bff42bSumit Bose You should also read the instructions in the <CODE>Configuration</CODE>
949fbc93defad394648b2651b43a7bbfa5bff42bSumit Bose file to see if you need to set any of the <CODE>Rule</CODE> lines.
949fbc93defad394648b2651b43a7bbfa5bff42bSumit Bose
949fbc93defad394648b2651b43a7bbfa5bff42bSumit Bose
949fbc93defad394648b2651b43a7bbfa5bff42bSumit Bose <LI>
949fbc93defad394648b2651b43a7bbfa5bff42bSumit Bose Configure Apache for your operating system. Normally you can just
949fbc93defad394648b2651b43a7bbfa5bff42bSumit Bose type run the <CODE>Configure</CODE> script as given below. However
949fbc93defad394648b2651b43a7bbfa5bff42bSumit Bose if this fails or you have any special requirements (e.g. to include
949fbc93defad394648b2651b43a7bbfa5bff42bSumit Bose an additional library required by an optional module) you might need
949fbc93defad394648b2651b43a7bbfa5bff42bSumit Bose to edit one or more of the following options in the
949fbc93defad394648b2651b43a7bbfa5bff42bSumit Bose <CODE>Configuration</CODE> file:
949fbc93defad394648b2651b43a7bbfa5bff42bSumit Bose <CODE>EXTRA_CFLAGS, LIBS, LDFLAGS, INCLUDES</CODE>.
949fbc93defad394648b2651b43a7bbfa5bff42bSumit Bose <P>
949fbc93defad394648b2651b43a7bbfa5bff42bSumit Bose
949fbc93defad394648b2651b43a7bbfa5bff42bSumit Bose Run the <CODE>Configure</CODE> script:
949fbc93defad394648b2651b43a7bbfa5bff42bSumit Bose <BLOCKQUOTE>
949fbc93defad394648b2651b43a7bbfa5bff42bSumit Bose <PRE>
949fbc93defad394648b2651b43a7bbfa5bff42bSumit Bose % Configure
949fbc93defad394648b2651b43a7bbfa5bff42bSumit Bose Using 'Configuration' as config file
949fbc93defad394648b2651b43a7bbfa5bff42bSumit Bose + configured for &lt;whatever&gt; platform
949fbc93defad394648b2651b43a7bbfa5bff42bSumit Bose + setting C compiler to &lt;whatever&gt; *
949fbc93defad394648b2651b43a7bbfa5bff42bSumit Bose + setting C compiler optimization-level to &lt;whatever&gt; *
949fbc93defad394648b2651b43a7bbfa5bff42bSumit Bose + Adding selected modules
949fbc93defad394648b2651b43a7bbfa5bff42bSumit Bose + doing sanity check on compiler and options
949fbc93defad394648b2651b43a7bbfa5bff42bSumit Bose Creating Makefile in support
949fbc93defad394648b2651b43a7bbfa5bff42bSumit Bose Creating Makefile in main
949fbc93defad394648b2651b43a7bbfa5bff42bSumit Bose Creating Makefile in os/unix
949fbc93defad394648b2651b43a7bbfa5bff42bSumit Bose Creating Makefile in modules/standard
949fbc93defad394648b2651b43a7bbfa5bff42bSumit Bose </PRE>
949fbc93defad394648b2651b43a7bbfa5bff42bSumit Bose </BLOCKQUOTE>
949fbc93defad394648b2651b43a7bbfa5bff42bSumit Bose
949fbc93defad394648b2651b43a7bbfa5bff42bSumit Bose (*: Depending on Configuration and your system, Configure
949fbc93defad394648b2651b43a7bbfa5bff42bSumit Bose make not print these lines. That's OK).<P>
949fbc93defad394648b2651b43a7bbfa5bff42bSumit Bose
949fbc93defad394648b2651b43a7bbfa5bff42bSumit Bose This generates a Makefile for use in stage 3. It also creates a
949fbc93defad394648b2651b43a7bbfa5bff42bSumit Bose Makefile in the support directory, for compilation of the optional
949fbc93defad394648b2651b43a7bbfa5bff42bSumit Bose support programs.
bfb40893be20b45279a40188cf16ef0eec1f9423Sumit Bose <P>
bfb40893be20b45279a40188cf16ef0eec1f9423Sumit Bose
bfb40893be20b45279a40188cf16ef0eec1f9423Sumit Bose (If you want to maintain multiple configurations, you can give a
bfb40893be20b45279a40188cf16ef0eec1f9423Sumit Bose option to <CODE>Configure</CODE> to tell it to read an alternative
bfb40893be20b45279a40188cf16ef0eec1f9423Sumit Bose Configuration file, such as <CODE>Configure -file
bfb40893be20b45279a40188cf16ef0eec1f9423Sumit Bose Configuration.ai</CODE>).
bfb40893be20b45279a40188cf16ef0eec1f9423Sumit Bose <P>
bfb40893be20b45279a40188cf16ef0eec1f9423Sumit Bose
bfb40893be20b45279a40188cf16ef0eec1f9423Sumit Bose <LI>
bfb40893be20b45279a40188cf16ef0eec1f9423Sumit Bose Type <CODE>make</CODE>.
bfb40893be20b45279a40188cf16ef0eec1f9423Sumit Bose</OL>
bfb40893be20b45279a40188cf16ef0eec1f9423Sumit Bose
bfb40893be20b45279a40188cf16ef0eec1f9423Sumit BoseThe modules we place in the Apache distribution are the ones we have
bfb40893be20b45279a40188cf16ef0eec1f9423Sumit Bosetested and are used regularly by various members of the Apache
bfb40893be20b45279a40188cf16ef0eec1f9423Sumit Bosedevelopment group. Additional modules contributed by members or third
bfb40893be20b45279a40188cf16ef0eec1f9423Sumit Boseparties with specific needs or functions are available at
bfb40893be20b45279a40188cf16ef0eec1f9423Sumit Bose&lt;<A HREF="http://www.apache.org/dist/contrib/modules/"
bfb40893be20b45279a40188cf16ef0eec1f9423Sumit Bose >http://www.apache.org/dist/contrib/modules/</A>&gt;.
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen GallagherThere are instructions on that page for linking these modules into the
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallaghercore Apache code.
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagher
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagher<H2><A NAME="install">Installing Apache</A></H2>
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagher
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen GallagherYou will have a binary file called <CODE>httpd</CODE> in the
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagher<CODE>src</CODE> directory. A binary distribution of Apache will
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallaghersupply this file. <P>
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagher
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen GallagherThe next step is to install the program and configure it. Apache is
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagherdesigned to be configured and run from the same set of directories
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagherwhere it is compiled. If you want to run it from somewhere else, make
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallaghera directory and copy the <CODE>conf</CODE>, <CODE>logs</CODE> and
46222e5191473f9a46aec581273eb2eef22e23beMichal Zidek<CODE>icons</CODE> directories into it. In either case you should
46222e5191473f9a46aec581273eb2eef22e23beMichal Zidekread the <A HREF="misc/security_tips.html#serverroot">security tips</A>
46222e5191473f9a46aec581273eb2eef22e23beMichal Zidekdescribing how to set the permissions on the server root directory.<P>
46222e5191473f9a46aec581273eb2eef22e23beMichal Zidek
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen GallagherThe next step is to edit the configuration files for the server. This
df0596ec12bc5091608371e2977f3111241e8cafSimo Sorceconsists of setting up various <STRONG>directives</STRONG> in up to three
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallaghercentral configuration files. By default, these files are located in
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagherthe <CODE>conf</CODE> directory and are called <CODE>srm.conf</CODE>,
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagher<CODE>access.conf</CODE> and <CODE>httpd.conf</CODE>. To help you get
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagherstarted there are same files in the <CODE>conf</CODE> directory of the
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagherdistribution, called <CODE>srm.conf-dist</CODE>,
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagher<CODE>access.conf-dist</CODE> and <CODE>httpd.conf-dist</CODE>. Copy
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagheror rename these files to the names without the <CODE>-dist</CODE>.
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen GallagherThen edit each of the files. Read the comments in each file carefully.
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen GallagherFailure to setup these files correctly could lead to your server not
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagherworking or being insecure. You should also have an additional file in
bfb40893be20b45279a40188cf16ef0eec1f9423Sumit Bosethe <CODE>conf</CODE> directory called <CODE>mime.types</CODE>. This
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagherfile usually does not need editing.
46222e5191473f9a46aec581273eb2eef22e23beMichal Zidek
46222e5191473f9a46aec581273eb2eef22e23beMichal Zidek<P>
46222e5191473f9a46aec581273eb2eef22e23beMichal Zidek
46222e5191473f9a46aec581273eb2eef22e23beMichal ZidekFirst edit <CODE>httpd.conf</CODE>. This sets up general attributes
46222e5191473f9a46aec581273eb2eef22e23beMichal Zidekabout the server: the port number, the user it runs as, etc. Next
46222e5191473f9a46aec581273eb2eef22e23beMichal Zidekedit the <CODE>srm.conf</CODE> file; this sets up the root of the
46222e5191473f9a46aec581273eb2eef22e23beMichal Zidekdocument tree, special functions like server-parsed HTML or internal
46222e5191473f9a46aec581273eb2eef22e23beMichal Zidekimagemap parsing, etc. Finally, edit the <CODE>access.conf</CODE>
46222e5191473f9a46aec581273eb2eef22e23beMichal Zidekfile to at least set the base cases of access.
46222e5191473f9a46aec581273eb2eef22e23beMichal Zidek
46222e5191473f9a46aec581273eb2eef22e23beMichal Zidek<P>
46222e5191473f9a46aec581273eb2eef22e23beMichal Zidek
46222e5191473f9a46aec581273eb2eef22e23beMichal ZidekIn addition to these three files, the server behavior can be configured
46222e5191473f9a46aec581273eb2eef22e23beMichal Zidekon a directory-by-directory basis by using <CODE>.htaccess</CODE>
bfdb2eeed95bde6cd065a9a47a7cb1773990ccfbOndrej Kosfiles in directories accessed by the server.
46222e5191473f9a46aec581273eb2eef22e23beMichal Zidek
46222e5191473f9a46aec581273eb2eef22e23beMichal Zidek<H3>Set your system time properly!</H3>
46222e5191473f9a46aec581273eb2eef22e23beMichal Zidek
bfdb2eeed95bde6cd065a9a47a7cb1773990ccfbOndrej KosProper operation of a public web server requires accurate time
46222e5191473f9a46aec581273eb2eef22e23beMichal Zidekkeeping, since elements of the HTTP protocol are expressed as the time
46222e5191473f9a46aec581273eb2eef22e23beMichal Zidekof day. So, it's time to investigate setting up NTP or some other
46222e5191473f9a46aec581273eb2eef22e23beMichal Zidektime synchronization system on your Unix box, or whatever the
46222e5191473f9a46aec581273eb2eef22e23beMichal Zidekequivalent on NT would be.
46222e5191473f9a46aec581273eb2eef22e23beMichal Zidek
46222e5191473f9a46aec581273eb2eef22e23beMichal Zidek<H3>Starting and Stopping the Server</H3>
46222e5191473f9a46aec581273eb2eef22e23beMichal Zidek
46222e5191473f9a46aec581273eb2eef22e23beMichal ZidekTo start the server, simply run <CODE>httpd</CODE>. This will look for
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagher<CODE>httpd.conf</CODE> in the location compiled into the code (by
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagherdefault <CODE>/usr/local/apache/conf/httpd.conf</CODE>). If
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagherthis file is somewhere else, you can give the real
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagherlocation with the -f argument. For example:
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagher
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagher<PRE>
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagher /usr/local/apache/httpd -f /usr/local/apache/conf/httpd.conf
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagher</PRE>
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagher
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen GallagherIf all goes well this will return to the command prompt almost
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagherimmediately. This indicates that the server is now up and running. If
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagheranything goes wrong during the initialization of the server you will
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallaghersee an error message on the screen.
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagher
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen GallagherIf the server started ok, you can now use your browser to
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagherconnect to the server and read the documentation. If you are running
46222e5191473f9a46aec581273eb2eef22e23beMichal Zidekthe browser on the same machine as the server and using the default
46222e5191473f9a46aec581273eb2eef22e23beMichal Zidekport of 80, a suitable URL to enter into your browser is
46222e5191473f9a46aec581273eb2eef22e23beMichal Zidek
46222e5191473f9a46aec581273eb2eef22e23beMichal Zidek<PRE>
46222e5191473f9a46aec581273eb2eef22e23beMichal Zidek http://localhost/
46222e5191473f9a46aec581273eb2eef22e23beMichal Zidek</PRE>
46222e5191473f9a46aec581273eb2eef22e23beMichal Zidek
46222e5191473f9a46aec581273eb2eef22e23beMichal Zidek<P>
46222e5191473f9a46aec581273eb2eef22e23beMichal Zidek
46222e5191473f9a46aec581273eb2eef22e23beMichal ZidekNote that when the server starts it will create a number of
949fbc93defad394648b2651b43a7bbfa5bff42bSumit Bose<EM>child</EM> processes to handle the requests. If you started Apache
949fbc93defad394648b2651b43a7bbfa5bff42bSumit Boseas the root user, the parent process will continue to run as root
949fbc93defad394648b2651b43a7bbfa5bff42bSumit Bosewhile the children will change to the user as given in the httpd.conf
949fbc93defad394648b2651b43a7bbfa5bff42bSumit Bosefile.
949fbc93defad394648b2651b43a7bbfa5bff42bSumit Bose
949fbc93defad394648b2651b43a7bbfa5bff42bSumit Bose<P>
949fbc93defad394648b2651b43a7bbfa5bff42bSumit Bose
949fbc93defad394648b2651b43a7bbfa5bff42bSumit BoseIf when you run <CODE>httpd</CODE> it complained about being unable to
949fbc93defad394648b2651b43a7bbfa5bff42bSumit Bose"bind" to an address, then either some other process is already using
949fbc93defad394648b2651b43a7bbfa5bff42bSumit Bosethe port you have configured Apache to use, or you are running httpd
949fbc93defad394648b2651b43a7bbfa5bff42bSumit Boseas a normal user but trying to use port below 1024 (such as the
949fbc93defad394648b2651b43a7bbfa5bff42bSumit Bosedefault port 80).
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagher
9a7b6d3248c5aac460e164f2246b26131cfbc055Simo Sorce<P>
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagher
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen GallagherIf the server is not running, read the error message displayed
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagherwhen you run httpd. You should also check the server
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallaghererror_log for additional information (with the default configuration,
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagherthis will be located in the file <CODE>error_log</CODE> in the
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagher<CODE>logs</CODE> directory).
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagher
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagher<P>
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagher
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen GallagherIf you want your server to continue running after a system reboot, you
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallaghershould add a call to <CODE>httpd</CODE> to your system startup files
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagher(typically <CODE>rc.local</CODE> or a file in an
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagher<CODE>rc.<EM>N</EM></CODE> directory). This will start Apache as root.
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen GallagherBefore doing this ensure that your server is properly configured
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagherfor security and access restrictions.
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagher
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagher<P>
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagher
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen GallagherTo stop Apache send the parent process a TERM signal. The PID of this
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagherprocess is written to the file <CODE>httpd.pid</CODE> in the
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagher<CODE>logs</CODE> directory (unless configured otherwise). Do not
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagherattempt to kill the child processes because they will be renewed by
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagherthe parent. A typical command to stop the server is:
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagher
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagher<PRE>
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagher kill -TERM `cat /usr/local/apache/logs/httpd.pid`
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagher</PRE>
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagher
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagher<P>
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagher
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen GallagherFor more information about Apache command line options, configuration
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagherand log files, see <A HREF="invoking.html">Starting Apache</A>. For a
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagherreference guide to all Apache directives supported by the distributed
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallaghermodules, see the <A HREF="mod/directives.html">Apache directives</A>.
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagher
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagher<H2>Compiling Support Programs</H2>
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagher
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen GallagherIn addition to the main <CODE>httpd</CODE> server which is compiled
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagherand configured as above, Apache includes a number of support programs.
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen GallagherThese are not compiled by default. The support programs are in the
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagher<CODE>support</CODE> directory of the distribution. To compile
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagherthe support programs, change into this directory and type
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagher<PRE>
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagher make
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagher</PRE>
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagher
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagher<!--#include virtual="footer.html" -->
505e75ba28b42bb3de7a6d55de825091b70cc2b2Stephen Gallagher</BODY>
4f3fd1fb264a7eaf3a9d062d49e071b0d17e4debStephen Gallagher</HTML>
4f3fd1fb264a7eaf3a9d062d49e071b0d17e4debStephen Gallagher