I was tasked with installing a new Apache and PHP on an existing and working RHEL4 servers. The new install had to be separate from the current one so to not disrupt the current work.
Apache was somewhat easy to install but here are my steps anyway.
I downloaded the source code from apache.org and untarred in my home directory.
As myself I then configured it with these parameters:
./configure –prefix=/opt/apache22 –exec-prefix=/opt/apache22 –datadir=/opt/apache22 –enable-mods-shared=all
Built it as myself with:
and as root installed it with:
I had to modify the /opt/apache22/conf/httpd.conf for a few things. After the ServerRoot line I added these 2 lines:
These allow many version of Apache to run on the same server without stepping on each other files. There is more to it but these were the 2 lines that took me a while to figure out because I was not reading the comment in the configuration file properly.
I also modified these lines to match what I wanted to do:
ScriptAlias /cgi-bin/ “/var/www/cgi-bin/”
Listening on an other port is the option I took to make sure I could run 2 Apache without stepping on each other toes. The user and group are the ones in RHEL4/5 so I simply re-used. The document root is a directory I created to be different than the default one (/var/www/html) used in RHEL4/5.
So it was quite simple for the Apache portion