Ubuntu – How to patch apache

apache-2.2patch-managementUbuntu

Ok, so I am using apache 2.2.17 on an Ubuntu (Natty Narwhal) box.

I need to apply a patch (mod_proxy_connect-2.2.16.patch) which I downloaded from https://issues.apache.org/bugzilla/attachment.cgi?id=26225&action=edit

however I have never done this before. I have no clue as to how to do it. It seems that I needed to recompile apache, but I cant even find the right packages (apt-get install apache2-src doesnt find anything).

Can anyone help me/ guide me in doing it? Thank you very much.

Best Answer

Download the source package and build dependencies:

apt-get source apache2
apt-get build-dep apache2

Apply the patch to the source:

cd apache2-2.2.17/
patch -p1 < patchfile

Build the debian package:

dpkg-buildpackage -uc -us -b

List the currently installed apache2 packages:

dpkg -l | egrep '^i+ +apache2'

Install the appropriate newly built packages (all the packages listed in the previous step) and restart apache:

cd ..
dpkg -i apache2_2.2.17******.deb
.......

apache2ctl restart

Source: http://base6.com/2009/06/07/patching-apache-on-debian/

-$

Related Topic