Apache2 HTTP Server ( 2.4.35 ) Released — Here’s How to Install / Upgrade on Ubuntu 16.04 | 18.04 LTS

The Apache foundation has just announced latest release of Apache2 HTTP server for immediate download… The latest version (2.4.35) offers number of bug fixes and security patches and some new features…. and this brief tutorial shows students and new users how to install it on Ubuntu 16.04 and 18.04 LTS servers…

This release is compatible with OpenSSL versions from 0.9.8a to 1.1.0 only, and does not support TLSv1.3. Future releases of httpd 2.4 are expected to add compatibility with OpenSSL 1.1.1 and enable support for TLSv1.3.

For more about this release, please check out its changelog page

Right now you won’t be able to get this latest Apache2 version in Ubuntu’s default repositories… In order to get it, you must add a third-party PPA which contains the latest packages..
Some of the changes added to this release are:

  • http: Enforce consistently no response body with both 204 and 304
  • mod_status: Cumulate CPU time of exited child processes in the
    “cu” and “cs” values. Add CPU time of the parent process to the
    “c” and “s” values.
    mod_proxy: Improve the balancer member data shown in mod_status when
    “ProxyStatus” is “On”: add “busy” count and show byte counts in
    auto mode always in units of kilobytes.
  • mod_status: Add cumulated response duration time in milliseconds.
  • mod_status: Complete the data shown for async MPMs in “auto” mode.
    Added number of processes, number of stopping processes and number
    of busy and idle workers.
  • mod_ratelimit: Don’t interfere with “chunked” encoding, fixing regression
    introduced in 2.4.34.
  • mod_proxy: Remove load order and link dependency between mod_lbmethod_*
    modules and mod_proxy.

To install the latest and current version of Apache2 HTTP server on Ubuntu, continue below:

Step 1: Add Third-party PPA

In order to get the latest version of Ubuntu, you may need to add the PPA repository below… Run the commands below to add this PPA, then install Apache2 server…

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

Step 2: Managing Apache2 server

After installing Apache2, it might be better to know simple commands to manage the server. The lines below shows you how to stop, start, restart and reload Apache2 server.

— Stops the server:  sudo systemctl stop apache2.service

— Starts the server:  sudo systemctl start apache2.service

— Restarts the server:  sudo systemctl restart apache2.service

—  Reload config changes no stops:  sudo systemctl reload apache2.service

Step 3: Configuring Apache2 Server

Apache2.conf is the main configuration file. It puts the pieces together by including all remaining configuration files when starting up the web server.

When Apache2 is installed on Ubuntu, by default its document root directory is created at this location: /var/www/html

Any file you save in there ending in .html that is formatted properly with HTML syntax,  apache2 will be able to serve to web clients. It is the root directory for the server.. This is the location the server looks to serve .html/htm documents by default.

The majority of Apache2 configuration files are stored in /etc/apache2 directory. In this directory is where you’ll find server configuration settings, modules, environment controls and many of the different files that control Apache2 servers.

Two important locations that you’ll spend most of your time are /etc/apache2/sites-available and /etc/apache2/sites-enabled

The sites-available directory contains all the available sites. This is the location you create new website configuration file.. and sites-enabled directory contains all sites that are enabled. By default, sites are not enabled until you run a commands to enable them.

The first default available site that’s also enabled is /etc/apache2/sites-available/000-default.conf

This file contains the basic Apache2 test settings configurations. You can keep the default site configuration file or copy to create something new and work from there. Make sure to enable the new site though.

Steps 4: Enabling and Disabling Apache2 Sites

After you configure your sites, you must enable them before they become operational. The commands below show you how to enable and disable Apache2 sites.

— Enable site example.com sudo a2ensite example.com

— Disable site example.com  sudo a2dissite example.com

Other modules can be enabled and disabled as well. Modules are codes/programs that are used to enhance Apache2 functionality or enable new features.

— Enable a module:   sudo a2enmod  module_name

— Disballe a module:  sudo a2dismod  module_name

This is the basic to Apache2. In the future, we’ll discuss more advanced stuff.

Because Apache2 is installed and the default site enabled, if you open your web browser and browse to the computer name or IP address, you’ll see Apache2 default test page.


This page shows because of a single index.html file in Apache2 root directory.

You may also like the post below:


  1. hi
    good article, but….
    apache 2.4.35 is not available on launchpad for 16.04 or 18.04… latest version is 2.4.34 for both. however, 2.4.35 is available as standard repo for 18.04 only.

  2. I follow the above command.
    but Apache/2.4.37 (Ubuntu) is installed.
    instead of 2.4.35 ..

  3. First, to @Al and @Brajesh, this is a repository. As time goes by, the repo is updated. His article was written before the latest update. (As of 2020-04-04, it is 2.4.41).

    Last, but not least, what if I want to get the latest version, (as of 2020-04-04, it is 2.4.43). I can download it from apache.org, and it has installation instructions, but those instructions assume I know where the apache server is normally installed. I searched everywhere, and got a great deal of common knowledge, regarding the location of system and user config files; even PHP config files, but no information whatsoever on where the executable is to go. (This information is needed to install from source).

    So haw about an article on how to install apache2, from source, on 18.04.4, and, since it is only four years, 16.04.x, and, since it is April of 2020, 20.04.x?

    That is what I need. Every article I searched, (except this one), starts with, “use [sudo apt-get apache2]….” This one does much better with, “use [sudo add-apt-repository…]….” Still, none gives information on how to install the “LATEST” apache2 from the apache website. (Apache cannot do that, since their are so many distos out there).


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.