There’s no reason for us not to use the latest stable version of software on our devices. In a web server environment, it’s always important to keep using the latest stable version of any web server, including Apache, Nginx, LiteSpeed, and Lighttpd.
As a free and open-source cross-platform web server software, Apache HTTP Server comes as the default web server besides Nginx in the VestCP control panel. Unfortunately, most of the Apache 2.4 installed on VestaCP is an outdated version, whether you are using Debian/Ubuntu or CentOS servers.
So we must update it to the latest stable version to get performance improvement and better stability. Considering that each of the latest stable releases of Apache HTTP Server definitely brings performance improvements and many bug fixes over the previous versions.
To update Apache 2.4 to the latest stable version on VestaCP Ubuntu 14.04 – 18.04 LTS (Bionic Beaver), we must add a third party repository. In this guide we will use Apache 2.x PPA (Personal Package Archives) from Ondrej Surý. The Ondrej Apache 2.x PPA follows the latest release of the Apache2 package which is maintained by the Debian Apache2 team and includes almost all Apache2 modules.
1.) Install the required packages and add Apache2 Ondrej PPA to your Ubuntu LTS system.
$ sudo apt-get install python-software-properties $ apt-get install software-properties-common $ sudo add-apt-repository ppa:ondrej/apache2 $ sudo apt-get update
2.) During the Apache 2.4 update process, you might get an error message like “NO_PUBKEY 4F4EA0AAE5267A6C”. Don’t worry, just run the following command to solve this error.
$ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 4F4EA0AAE5267A6C $ sudo apt-get update
NOTE: Don’t forget to replace the NO_PUBKEY 4F4EA0AAE5267A6C with your PUBKEY:
3.) Next, we need to make a backup for apache2.conf
$ cp /etc/apache2/apache2.conf /etc/apache2/apache2.conf.bak
4.) Finally, run the following command to update Apache2 to the latest stable version on VestaCP Ubuntu 16.04 – 18.04 LTS.
$ sudo apt-get dist-upgrade
NOTE: Please select “NO / N = Default” if you want to keep yout apache2.conf file.
5.) Restart Apache2 Web Server
$ service apache2 restart $ apache2 -v
We are a bunch of people who are still continue to learn Linux servers. Only high passion keeps pushing us to learn everything.