Install apache 2.4 on debian wheezy

apache-2.4

I have a debian and when i try to install apache2.4 with

apt-get update
apt-get install apache2

I have the version 2.2, anyone know how to install the 2.4 ?

Best Answer

If you really need apache 2.4 I would recommend using jessie altogether for your machine's distribution instead of wheezy if possible to avoid having a mixed sources environment which would put you in a less-commonly used and less supported configuration.

Otherwise if there is a specific reason that makes you want to use 2.4 perhaps there's a workaround to update your php files or other to make it work in apache 2.2 and stay on wheezy.

But if you really want to go into a mixed sources environment it's possible using apt pinning, that will involve 2 steps:

  • Adding sources of jessie to your /etc/apt/sources.list
  • Adding a pinning preference in /etc/apt/preferences

Here's more information about it: https://wiki.debian.org/AptPreferences

Note that you might be faced with new apt dependency issues as your machine updates evolve and you install apache modules with mixed dependencies to 2.2 or 2.4. If it's an acceptable complication for your needs you could go ahead with it.