By Ken Coar, Rich Bowen
Book Price: $29.95 USD
£20.95 GBP
PDF Price: $22.99
Cover | Table of Contents | Colophon
# up2date -ui apache apache-devel apache-manual
# up2date -ui httpd httpd-devel httpd-manual
ftp://ftp.redhat.com/ or
ftp://updates.redhat.com/), and
install it with the following command:# rpm -Uvh apache
#) across
the screen, marking the progress of the installation.http://httpd.apache.org/download. The
following screenshots come from an actual installation made using
this method.
http://httpd.apache.org/dist/, and then:% tar xzvf apache_1.3.27.tar.gz
tar doesn't
support the z option for processing zipped
archives, use this command instead:% gunzip -c < apache_1.3.27.tar.gz | tar xvf -
% cvs -d :pserver:anoncvs@CVS.Apache.Org:/home/cvspublic login Password: anoncvs % cvs -d :pserver:anoncvs@CVS.Apache.Org:/home/cvspublic checkout apache-1.3
% cvs -d :pserver:anoncvs@CVS.Apache.Org:/home/cvspublic checkout -r APACHE_1_3_27
apache-1.3
% cvs -d :pserver:anoncvs@CVS.Apache.Org:/home/cvspublic login Password: anoncvs % cvs -d :pserver:anoncvs@CVS.Apache.Org:/home/cvspublic checkout -r APACHE_2_0_BRANCH httpd-2.0 % cd httpd-2.0/srclib % cvs checkout apr apr-util
% ./configure --prefix= /usr/local/apache --with-layout=Apache --enable-shared=max--enable-module=most % make # make install
% ./buildconf % ./configure --prefix= /usr/local/apache --with-layout=Apache --enable- modules=most --enable-mods-shared=all % make # make install
% ./configure --help
http://Apache-Server.Com/tutorials/ or
http://httpd.apache.org/docs-2.0/install.html)
when you want to change the defaults. The default options generally
produce a working server, although the filesystem locations and
module choices may not be what you'd like; they may
include modules you don't want or omit some you do.
(See Chapter 2 for some examples.)http://www.apachetoolbox.com/. (Note that the
version numbers will probably be different than these, which were the
latest available when this section was written.) Unpack the file:% bunzip2 Apachetoolbox-1.5.65.tar.bz2 % tar xvf Apachetoolbox-1.5.65.tar
tar, you may be able
to combine these operations into a single tar
xjvf command.)# cd Apachetoolbox-1.5.65 # ./install.sh
apachectl start
apachectl graceful
apachectl restart
apachectl stop
# rpm -ev apache
http://modules.apache.org/. Some modules are
so popular—or complex—that they have entire sites devoted
to them, as do the ones listed in this chapter.% /path/to/apache/ bin/apxs -cia module.c
-cia options mean to compile, install, and
activate. The first is pretty straightforward; install means put the
.so file in the place Apache expects to find it,
and activate means to add the module to the
httpd.conf file.http://webdav.org/mod_dav/, and then:% cd mod_dav-1.0.3-1.3.6 % ./configure --with- apxs=/usr/local/ apache/bin/apxs % make # make install
# cd /usr/local/apache # mkdir var # chgrp nobody var # chmod g+w var
<IfModule mod_dav.c>
DAVLockDB var/DAVlock
</IfModule>
http://webdav.org/mod_dav/win32/. Verify that
your Apache installation already has the
xmlparse.dll and xmltok.dll
files in the ServerRoot directory; if they
aren't there, check through the Apache directories
to locate and copy them to the ServerRoot.
mod_dav requires the Expat
package, which is included with versions of the Apache web server
after 1.3.9; these files hook into Expat, which
mod_dav will use.C:\>cd mod_dav-1.0.3-dev C:\mod_dav-1.0.3-dev>copy mod_dav.dll C:\Apache\modules C:\mod_dav-1.0.3-dev>cd \Apache
LoadModule dav_module modules/mod_dav.dll
http://perl.apache.org/.
Then use the following command:% perl Makefile.PL \ > USE_APXS=1 \ > WITH_APXS= /usr/local/apache/bin/apxs \ > EVERYTHING=1 \ > PERL_USELARGEFILES=0 % make % make install
# cd ServerRoot # mkdir lib lib/perl lib/perl/Apache
#! /usr/bin/perl
BEGIN {
use Apache ( );
use lib Apache->server_root_relative('lib/perl');
}
use Apache::Registry ( );
use Apache::Constants ( );
use CGI qw(-compile :all);
use CGI::Carp ( );
1;
http://php.net/ (follow
the links for downloading) and unpack it. Then:% cd php-4.3.2 % ./configure \ > --with-apxs= /usr/local/apache/bin/ apxs % make # make install
<?php phpinfo( ); ?>
<IfModule mod_php4.c>
AddType application/x-httpd-php .php
AddHandler application/x-httpd-php .php
</IfModule>
http://php.net/
http://php.net/....\PHP4>copy php.ini-dist %SYSTEMROOT%\php.ini ...\PHP4>copy php4ts.dll %SYSTEMROOT%
%WINDOWS% instead of
%SYSTEMROOT%.)extensions_dir, and change
the value to point to the PHP4\extensions
directory. For instance, if you unpacked the
.zip file into C:\PHP4,
this line should look like:extensions_dir = C:\PHP4\extensions
LoadModule php4_module modules/php4apache.dll
<IfModule mod_php4.c>
AddType application/x-httpd-php .php
</IfModule>
http://sourceforge.net/projects/modsnake/ web site
(follow the link for downloading), unpack it, and then:% cd mod_snake-0.5.0 % ./configure --with-apxs= /usr/local/apache/bin/apxs % make # make install
http://modsnake.sourceforge.net/
http://www.modssl.org/ web site and unpack it.
Then:% cd mod_ssl-2.8.14-1.3.27 % ./configure \ > --with-apache=.. /apache_1.3.27 \ > --with-ssl=SYSTEM \ > --prefix= /usr/local/apache % cd ../apache_1.3.27 % make % make certificate
CustomLog logs/access_log combined
Referer (where the client linked
from) and the User-agent (what browser they are
using).http://httpd.apache.org/docs/mod/mod_log_config.html
http://httpd.apache.org/docs-2.0/mod/mod_log_config.html
LogLevel Debug
emerg
alert
crit
error
warn
notice
info
http://Apache-Cookbook.Com/
http://OnLAMP.Com/apache/
http://ApacheToday.Com/
ftp://ftp.isi.edu/in-notes/rfc2616.txt
http://www.rfc-editor.org/cgi-bin/rfcsearch.pl
and search for "TCP" in the title
field)CustomLog logs/cookies_in.log "%{UNIQUE_ID}e %{Cookie}i"
CustomLog logs/cookies2_in.log "%{UNIQUE_ID}e %{Cookie2}i"
CustomLog logs/cookies_out.log "%{UNIQUE_ID}e %{Set-Cookie}o"
CustomLog logs/cookies2_out.log "%{UNIQUE_ID}e %{Set-Cookie2}o"
http://Apache-Cookbook.Com/.UNIQUE_ID environment
variable (assuming that
mod_unique_id
is active in the server and that the
activity log format includes the environment variable with a
%{UNIQUE_ID}e format effector).Cookie
and Set-Cookie
header
fields are most commonly used. The Cookie2 and
corresponding Set-Cookie2 fields are newer and
have been designed to correct some of the shortcomings in the
original specifications, but they haven't yet
achieved much penetration.