Upgrade Apache to 2.4.52 version to fix the DOS vulnerability in Apache HTTP server | Community
Skip to main content
Raja-Karuppsamy
Community Advisor
Community Advisor
January 4, 2022
Solved

Upgrade Apache to 2.4.52 version to fix the DOS vulnerability in Apache HTTP server

  • January 4, 2022
  • 1 reply
  • 8798 views

Hi All,

 

It is recommend to update Apache HTTP Server to the latest and stable version i.e. 2.4.52 to fix the DOS vulnerability in Apache HTTP server. Do we have steps to update the Apache version to 2.4.52  ? please share if anyone already performed.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Asutosh_Jena_

Hi @raja-karuppsamy 

 

If you have installed it using "yum", then you need to wait until the new version is available via satellite.

 

Else you can take the backup of your all config and follow the below approach to upgrade it.

Install latest version on apache httpd on Linux
Navigate to desired directory on the server (Anywhere you have some storage space to store the httpd tar files)
Download the tar file - 
wget http://mirrors.estointernet.in/apache/httpd/httpd-2.4.52.tar.gz      {Always see what the latest version available - http://mirrors.estointernet.in/apache/httpd/ }
Unzip
gzip -d httpd-2.4.52.tar.gz;tar -xvf httpd-2.4.52.tar
cd httpd-2.4.52/srclib
Download dependency files (apr and apr-util)
wget http://mirrors.estointernet.in/apache/apr/apr-1.7.0.tar.gz;wget http://mirrors.estointernet.in/apache/apr/apr-util-1.6.1.tar.gz
Unzip
gzip -d apr-1.7.0.tar.gz;tar -xvf apr-1.7.0.tar
gzip -d apr-util-1.6.1.tar.gz;tar -xvf apr-util-1.6.1.tar
Rename 
mv apr-1.7.0 apr;mv apr-util-1.6.1 apr-util
Install other dependencies (pcre and GCC)
yum -y install pcre-devel gcc
Install expat (another dependency)
wget https://github.com/libexpat/libexpat/releases/download/R_2_2_9/expat-2.2.9.tar.bz2
tar xvjf expat-2.2.9.tar.bz2 -C /opt/apache_files    	{/opt/apache_files – This the directory where you want to untar the expat files}
cd /path/to/untar    {{/opt/apache_files in this case}
./configure --prefix=/opt/apache_files/
make
make install
cd /opt/aem/dispatcher/httpd-2.4.52/ 		{This is the directory that you downloaded the very first httpd tar file as per this doc}
./configure --with-included-apr --prefix=/etc/httpd --with-expat=/opt/apache_files  {/opt/apache_files – This is the path of your expat make sure you CHANGE accrodingly}
make
make install

/etc/httpd/bin/apachectl restart
/etc/httpd/bin/httpd restart

/etc/httpd/bin/apachectl -v

 

Hope this helps!

 

Thanks! 

1 reply

Asutosh_Jena_
Community Advisor
Asutosh_Jena_Community AdvisorAccepted solution
Community Advisor
January 5, 2022

Hi @raja-karuppsamy 

 

If you have installed it using "yum", then you need to wait until the new version is available via satellite.

 

Else you can take the backup of your all config and follow the below approach to upgrade it.

Install latest version on apache httpd on Linux
Navigate to desired directory on the server (Anywhere you have some storage space to store the httpd tar files)
Download the tar file - 
wget http://mirrors.estointernet.in/apache/httpd/httpd-2.4.52.tar.gz      {Always see what the latest version available - http://mirrors.estointernet.in/apache/httpd/ }
Unzip
gzip -d httpd-2.4.52.tar.gz;tar -xvf httpd-2.4.52.tar
cd httpd-2.4.52/srclib
Download dependency files (apr and apr-util)
wget http://mirrors.estointernet.in/apache/apr/apr-1.7.0.tar.gz;wget http://mirrors.estointernet.in/apache/apr/apr-util-1.6.1.tar.gz
Unzip
gzip -d apr-1.7.0.tar.gz;tar -xvf apr-1.7.0.tar
gzip -d apr-util-1.6.1.tar.gz;tar -xvf apr-util-1.6.1.tar
Rename 
mv apr-1.7.0 apr;mv apr-util-1.6.1 apr-util
Install other dependencies (pcre and GCC)
yum -y install pcre-devel gcc
Install expat (another dependency)
wget https://github.com/libexpat/libexpat/releases/download/R_2_2_9/expat-2.2.9.tar.bz2
tar xvjf expat-2.2.9.tar.bz2 -C /opt/apache_files    	{/opt/apache_files – This the directory where you want to untar the expat files}
cd /path/to/untar    {{/opt/apache_files in this case}
./configure --prefix=/opt/apache_files/
make
make install
cd /opt/aem/dispatcher/httpd-2.4.52/ 		{This is the directory that you downloaded the very first httpd tar file as per this doc}
./configure --with-included-apr --prefix=/etc/httpd --with-expat=/opt/apache_files  {/opt/apache_files – This is the path of your expat make sure you CHANGE accrodingly}
make
make install

/etc/httpd/bin/apachectl restart
/etc/httpd/bin/httpd restart

/etc/httpd/bin/apachectl -v

 

Hope this helps!

 

Thanks!