|
Apache HTTP Server Version 1.3Compiling and Installing Apache 1.3UnixWare users will want to consult build notes for various UnixWare versions before compiling.Downloading ApacheInformation on the latest version of Apache can be found on the Apache web server at http://www.apache.org/. This will list the current release, any more recent beta-test release, together with details of mirror web and anonymous ftp sites.If you downloaded a binary distribution, skip to Installing Apache. Otherwise read the next section for how to compile the server. Compiling ApacheCompiling Apache consists of three steps: Firstly select which Apache modules you want to include into the server. Secondly create a configuration for your operating system. Thirdly compile the executable.
All configuration of Apache is performed in the
Installing ApacheYou will have a binary file calledhttpd in the
src directory. A binary distribution of Apache will
supply this file.
The next step is to install the program and configure it. Apache is
designed to be configured and run from the same set of directories
where it is compiled. If you want to run it from somewhere else, make
a directory and copy the
The next step is to edit the configuration files for the server. This
consists of setting up various directives in up to three
central configuration files. By default, these files are located in
the
First edit
In addition to these three files, the server behavior can be configured
on a directory-by-directory basis by using Set your system time properly!Proper operation of a public web server requires accurate time keeping, since elements of the HTTP protocol are expressed as the time of day. So, it's time to investigate setting up NTP or some other time synchronization system on your Unix box, or whatever the equivalent on NT would be.Starting and Stopping the ServerTo start the server, simply runhttpd . This will look for
httpd.conf in the location compiled into the code (by
default /usr/local/apache/conf/httpd.conf ). If
this file is somewhere else, you can give the real
location with the -f argument. For example:
/usr/local/apache/httpd -f /usr/local/apache/conf/httpd.confIf all goes well this will return to the command prompt almost immediately. This indicates that the server is now up and running. If anything goes wrong during the initialization of the server you will see an error message on the screen. If the server started ok, you can now use your browser to connect to the server and read the documentation. If you are running the browser on the same machine as the server and using the default port of 80, a suitable URL to enter into your browser is http://localhost/ Note that when the server starts it will create a number of child processes to handle the requests. If you started Apache as the root user, the parent process will continue to run as root while the children will change to the user as given in the httpd.conf file.
If when you run
If the server is not running, read the error message displayed
when you run httpd. You should also check the server
error_log for additional information (with the default configuration,
this will be located in the file
If you want your server to continue running after a system reboot, you
should add a call to
To stop Apache send the parent process a TERM signal. The PID of this
process is written to the file kill -TERM `cat /usr/local/apache/logs/httpd.pid` For more information about Apache command line options, configuration and log files, see Starting Apache. For a reference guide to all Apache directives supported by the distributed modules, see the Apache directives. Compiling Support ProgramsIn addition to the mainhttpd server which is compiled
and configured as above, Apache includes a number of support programs.
These are not compiled by default. The support programs are in the
support directory of the distribution. To compile
the support programs, change into this directory and type
make Apache HTTP Server Version 1.3 |
|||||||||||||||||
With any suggestions or questions please feel free to contact us |