Thursday, January 21, 2016

Upgrade Apache Webserver

Following is the process to upgrade Apache

1) Download and Extract the new Apache binaries into /tmp/apache-new folder

2) Stop the running Apache --> /etc/init.d/httpd stop

3) Take a backup of existing config files -->

mv /usr/local/apache/conf /usr/local/apache/conf.old
cp /usr/local/apache/conf/vhosts /tmp/vhosts.old

4) Take a backup of complete Apache folder -->
mv /usr/local/apache /usr/local/apache.old

5) Create a new folder of Apache directory
mkdir -p /usr/local/apache

6) Now move to /tmp/apache-new/httpd-2.xx/ and run the following

Make sure you have noted down the required modules. If not, check the existing config logs (config.log).

./configure --enable-mods-shared="all ssl cache proxy authn_alias mem_cache file_cache charset_lite dav_lock disk_cache" --prefix=/usr/local/apache
make install

7) Copy the config and vhost files: /usr/local/apache/conf.old, /tmp/vhosts.old

8) Check and if required modify the script /ect/init.d/httpd to point to new httpd file

9) Now start the httpd --> /etc/init.d/httpd start
10) Check the version --> httpd –v

No comments:

Post a Comment