|
Prerequisites: |
FreeBSD (Base + Autoconf, Automake,
Bash and GCC) OpenSSL |
|
Overview: |
|
Apache – Web server
Home:
# Download (Notes:
Users behind a Proxy
Server should read this and
users without Internet but have a CDRom read this.)
cd /usr/src
fetch
http://mirror.its.uidaho.edu/pub/apache/httpd/httpd-2.2.9.tar.gz
# Unzip and Untar
tar xvf
httpd-?.?.?.tar.gz
# Change dir
cd httpd-?.?.?
# Edit
two (2) files to mimic FreeBSD "Ports" installation
vi
/usr/src/httpd-?.?.?/include/httpd.h
# find DEFAULT_ERRORLOG
and change logs/error_log to
/var/log/httpd-error.log
vi /usr/src/httpd-?.?.?/include/scoreboard.h
# find DEFAULT_SCOREBOARD
and change logs/apache_runtime_status
to /var/run/apache_runtime_status
# Configure
./configure --enable-layout=FreeBSD
--sysconfdir=/usr/local/etc/apache22 --sharedstatedir=/var/run
--localstatedir=/var --with-port=80 --with-sslport=443
--enable-v4-mapped --with-mpm=prefork --mandir=/usr/local/man
--infodir=/usr/local/info --build=i386-srcbld-freebsd7.0
--enable-modules=all --enable-mods-shared=all --enable-http
--enable-ssl --enable-cgi --enable-cgid --enable-expires
--enable-headers --enable-mime-magic --enable-imagemap
--enable-cern-meta --enable-usertrack --enable-unique-id --enable-speling
--enable-rewrite --enable-so --enable-info --enable-authn-anon
--enable-authn-dbd --enable-authn-alias --enable-authz-owner
--enable-auth-digest --enable-cache --enable-mem-cache --enable-dav
--enable-dav-fs --enable-dav-lock --enable-dbd --enable-dumpio
--enable-ext-filter --enable-deflate --enable-log-forensic --enable-logio
--enable-ident --enable-proxy --enable-proxy-connect
--enable-proxy-ftp --enable-proxy-http --enable-proxy-ajp
--enable-proxy-balancer --enable-vhost-alias --enable-suexec
--enable-authz-dbm --enable-isapi --enable-file-cache
--enable-disk-cache --enable-case-filter --enable-case-filter-in
--enable-charset-lite --enable-deflate --enable-bucketeer --enable-logio
--enable-version --enable-authn-dbm --enable-exception-hook
--enable-substitute
# Compile
make
# Install
make install
|
Simple test of the Apache web server |
|
# Quick Start Server Tests: |
|
Create an “rc” script to start Apache at boot time |
|
# Update rc.conf
# Create “rc” scripts to start at boot time
(Although this example is a source install, these scripts are from
the FreeBSD Ports and work as designed): vi
/usr/local/etc/rc.d/htcacheclean |
|
Apache Notes for Admins |
|
# Edit the "httpd.conf" to suit your needs, at least
change the variables:
# Commands to remember: # The
Apache configuration file: # Apache logs: |
|
mod_perl |
|
|
Home: |
http://perl.apache.org/ |
|
# Change to the /tmp
directory not your normal source dir!
# Edit the "httpd.conf" and add the new perl
module to load, at the very bottom of the conf file
# Compile
cd /usr/src/httpd-?.?.? # Mod Perl Quick Start: http://perl.apache.org/docs/2.0/user/intro/start_fast.html |
|
|
HTTPS / SSL Web Server |
|
# Adding HTTPS / SSL ability to your Apache Web Server # Create a certificate authority |