Apache 2.4

This guide describes the most common changes that you will need to do to get its website compatible with Apache 2.4

Apache 2.4 has many advantages compared to its predecessor 2.2. The biggest benefit is the achievement. Apache 2.4 is much more efficient than 2.2 and thus can deliver most websites faster than its predecessor.

As the support for Apache 2.2 will end completely in the near future should this update be done as soon as possible.

Make your website compatible with Apache 2.4

For example, if you are using WordPress, Joomla, or other publishing tools, there is probably not much you will need to do to get your site to work with Apache 2.4.

  • Always make sure that everything (wordpress, joomla, plugins, themes, etc.) are updated to the latest version.
  • Make sure the plugins/Themes you are using still receive updates from the developers. For WordPress you will find this information on wordpress.org or on the website where the theme/plugin was purchased. If the plugin/theme has been updated over the past few months, it would be considered active and should be compatible with Apache 2.4.
  • If parts of your website are custom-built, please contact the one who has built the website and verify that all of these sections are compatible with Apache 2.4.

Note that any updates must be completed BEFORE you switch to Apache 2.4 in your customer zone. Should the page stop functioning after you change to Apache 2.4, try switching to PHP version 7.0, 7.1 or 7.2 or contact our support.

Get your website working with Apache 2.4

To run your website with Apache 2.4 at Loopia Log in to Loopia Customer zone and click on your domain name. Under the heading “Configuration” and select “Homepage with Loopia” -> “Unix” and choose “PHP 7.2 Apache 2.4” to run the page with Apache 2.4 and PHP Version 7.2.

Manual Update (Advanced)

The update to Apache 2.4 affects the directive in the .htaccess file, including features that write in the .htaccess file. The major changes here concern the authorization settings, which control who can see a page and who to shut out. These features are often used in page firewalls, and for example, only allow visitors with specific IP addresses to visit a page. Check if .htaccess file contains any of the following directives:

  • Order
  • Allow
  • Deny
  • Satisfy

If it does not, it may appear that you do not use such features as of today. Then the code should already work properly on Apache 2.4.

In Apache 2.4, instead of “require” directive is used to describe criteria that must be met in order for a visitor to see the page.

See also: https://httpd.apache.org/docs/2.4/mod/mod_authz_core.html

These directives can be grouped into different blocks that govern what is required for them to be considered as fulfilled.

  • RequireAll

All requirements must be met in order for the visitor to access the page.

  • RequireAny

Only a requirement in the block must be met in order to allow access to the page. If the Require Directive is not grouped, they will be handled in the same way as if they were a RequireAny block.

  • RequireNone

None of the Require Directives in the Block can be met in order for the visitor to access the page.

Example

Changes affecting AddOutFilterByType

The AddOutputFilterByType directive has been moved to module mod_filter from Apache 2.4. This is a module not found on our web servers. Thus, all rows of the .htaccess file that run this directive must be deleted.

If you currently use this directive to enable Gzip, you do not need to do anything other than delete the files. Gzip compression is automatically enabled on our Apache 2.4 platform.

Other changes and more information

In addition to the above changes, some minor changes have also been made to Apache 2.4. The majority of those who need to update their code are not affected by these. A complete description of what has been updated can be found below:

https://httpd.apache.org/docs/trunk/upgrading.html

Was this article helpful?

Related Articles