Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

3 Answers 3

up vote 3 down vote accepted

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/

-$

share|improve this answer

In all likelihood, you've installed Apache using apt-get - this downloads and installs pre-built binary packages, which are customized to do things in the Debian way - file locations, default config files, upstart scripts, and niceties like logwatch are handled for you.

Compiling the software from source in Ubuntu is definitely doable, but you're then on your own as far as applying future patches and version upgrades - which will also need to have the connect-method-over-SSL patch applied, then re-compiled from source (no more apt-get upgrade). And you'll need to stick to the current version of Apache instead of the one your OS came with, as Ubuntu backports security fixes from new versions).

Also, you'll need to have the understanding that anything on the internet related to an Apache install on Ubuntu is probably no longer applicable to your install of Apache - file paths, config files, compile options will all be different.

If you're set on this approach, run apt-get install build-essential then follow Apache's guide here. It may not be worth the headache - have you considered just putting up something like stunnel to handle the SSL part to allow for the connection to hit Apache on port 80?

share|improve this answer

the easiest way would be:

  1. install apxs2:

apt-get install apache2-prefork-dev (or worker if you are using it)

  1. just get the source:

    apt-get source apache2 cd apache2-2.2.17/

  2. apply your patch file

  3. go to directory where c file is and run apxs2 -cia mod_proxy_connect.c

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.