Apache

What is Apache?

Apache is almost the most famous Open Source Application in the world. It is written in C and is composed of many modules. The latest version can be downloaded at http://www.apache.org/ .

Installation and Start/Stop

The simple way to install Apache is to use RPM if you use Redhat like me.

 rpm -i /path/apache*.rpm

It is not that easy to install Apache alone.

Usually, Apache would be installed several times.

tar zxvf apache_x.x.xx.tar.gz:
./configure --prefix=/usr/local/apache --enable-module=usertrack 
--enable-rule=SOCKS4 // the next time, you can use ./config.status instead of ./configure
// coz it records the history make make install make clean

If you want to start Apache at bootup, do the following at Redhat.

cp -f /usr/local/apache/conf/*.conf /etc/httpd/conf/
// copy configuration files for bootup
rm /etc/rc.d/init.d/httpd
// create a link
ln -s /usr/local/apache/bin/apachectl /etc/rc.d/init.d/httpd 

Start/Stop Apache:

/etc/rc.d/init.d/httpd restart
/usr/local/apache/bin/httpd -l
/usr/local/apache/bin/apachectl configtest

Why do you need to know Apache conf files?

 

Install mod_perl

see the latest infomation at http://perl.apache.org/guide/

tar xzvf mod_perl-x.x.x.tar.gz
cd mod_perl*tar.gz
perl Makefile.PL APACHE_SRC=../apache-x.x.x/src \
DO_HTTPD=1 USE_APACI=1 EVERYTHING-1
make && make test && make install
cd ../apache-x.x.x
make install

edit httpd.conf

Alias /perl/ /home/httpd/perl/
<location /perl>
 SetHandler perl-script
 PerlHandler Apache::Registry 
 Options ExecCGI
</location>