Updating Apache to the latest version

  • Posted June 30, 2014

According Sucuri Sitecheck, we are using an outdated Web Server Apache. Now, I am not able to find any tutorials/instructions on how to update to the latest Apache version. Any help would be appreciated. Thanks.


how to fix this?

Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:

The following packages have unmet dependencies: apache2 : Depends: apache2-bin (= but it is not going to be installed Depends: apache2-utils (= E: Unable to correct problems, you have held broken packages.

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

I have ubuntu 14.04.5 and apache version 2.4.29. I updated it using following commands and it updated.

sudo add-apt-repository ppa:ondrej/apache2
sudo apt update
sudo apt upgrade

when I tried to check the new version using /usr/sbin/apache2 -v it shows the old version that is 2.4.29

any suggestions?

What about Centos 7?

Ubuntu 12.04 is a Long Term Support release. This means that the version of Apache included with it will continue to receive security updates into 2017. So while you might not have the most recent version installed, security patches are backported to your version. So you shouldn’t necessarily be concerned that you don’t have the latest.

When making upgrades to a major piece of software like Apache, you risk making your system unstable. One of the main reasons for using a distribution’s package management system rather than installing the latest upstream software is that you get a set of packages that have been tested together. If you update one outside of the package management system, you may introduce incompatibilities. This can particularly be a problem if you rely on non-default Apache modules.

If you really need a more recent version of Apache, I’d suggest upgrading to Ubuntu 14.04. If you don’t want to do that, you can still get a more recent version by enabling this PPA:

sudo add-apt-repository ppa:ondrej/apache2
sudo apt-get update
sudo apt-get dist-upgrade

What operating system is your droplet running?