cPanel EasyApache 4

easyapache 4
easyapache 4

cPanel continues to surprise the industry-releasing one new feature here and there, making sure that its clients get the most out of their investments. With its newest innovation, cPanel is set to enhance the client’s web hosting experience.

The launch of EasyApache 4 (EA 4) brings various improvements in installation, update, and other features that are important for the client. EasyApache 4 is a major revamp of how cPanel and WHM ships and maintains the Apache and PHP distribution.

EasyApache 4 represents a total overhaul of how cPanel & WHM ships and maintains our Apache and PHP distribution.

Simply explained, EasyApache is the software that installs, configures, updates, and validates your web server, PHP, and other components of your web server.

cPanel & WHM installs EasyApache 4 by default on new installations of systems that run cPanel & WHM version 58 or higher.

EasyApache 4 offers the following improvements over EasyApache 3:

  • Binary packages
  • Software collections
  • Path reorganization
  • MultiPHP support
  • Post-update actions

Binary packages

Binaries are cost-efficient improvements that save time and monetary resources for site owners, server owners, and developers.

Rather than compile binaries from source, we build RPM packages with binaries that you can easily install via yum. This allows for quicker, automatic updates of packages.

The system forks any custom packages from the Red Hat® specification files, but contain the latest version. Binary packages also allow Apache and PHP to automatically update.

Binary Packages allow for quicker updates, installations, and the ability to spin down and spin up different web stacks and configurations quickly. This reduces the cost for site owners and server owners.

These binaries reduce the time it takes for updates and installs to a few minutes. This also allows developers to quickly spin up and spin down different configurations.

Software collections

EasyApache 4 uses the Software Collections Library (SCL) for PHP packages. The use of SCLs enables the installation of multiple, concurrent version of PHP on the file system.

An SCL is an alternate path inside the /opt file that contains the full file system that various software needs. When you enable an SCL, it adds the path within that environment to the system. Commands that do not specify a path and scripts that use the /usr/bin/env file to determine their path can then use this path to find the appropriate version of the software.

How to execute a script with SCL

To execute a script with a software collection environment, you must run the scl command. For example, to run the php -v command on a php56 collection, run the following command:

scl enable ea-php56 ‘php -v’

This command’s output will resemble the following example:

PHP 5.6.6 (cli) (built: Jul 16 2015 12:28:49)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies 

Path reorganization
The system originally stored Apache files in the /usr/local/apache directory. This directory no longer exists except for a few symlinks.
EasyApache 4’s path reorganization includes the following benefits:
  • The additional paths allow EasyApache 4 to function quicker and more efficiently.
  • The additional paths allow multiple directories to store data and symlink between files.
  • The additional paths allow more effective storage of data, especially with backups and recovery.

The following table lists the new file directories where EasyApache 4 now stores the Apache files:

 

File or Directory location Description
/usr/bin/httpd/ This directory contains the actual Apache executable, binary file, and webserver.
/var/log/apache2/ This directory contains all the logs for the apache2 file as well as all access logs.
/etc/apache2/ This directory contains the configuration directory for Apache and contains all directories for Apache includes, modules, and configuration files. This directory does not contain log files.
Note: This directory uses the symlink to the usr/lib64/apache24/ directory.
/usr/lib64/apache2/modules/ This directory contains all of the dynamic modules for Apache.
/opt/cpanel/ea-php*/ This SCL directory contains all of Apache’s binary files.
/etc/apache2/logs/access_log/ This file contains HTTP requests that the server received and that did not go to a domain.
/etc/apache2/logs/domlogs/ This directory contains a log of HTTP requests that the system routed to a domain.
/etc/apache2/logs/error_log/ This file contains error information.
/var/www/html/ This directory contains the document root for the server. It contains default pages that users can see.
/etc/apache2/logs/ This directory contains an alias to the /var/log/apache2/ directory.
/etc/apache2/modules/ This directory contains an alias to the /usr/lib64/apache2/modules/ directory.

MultiPHP support

EasyApache 4 supports multiple versions of PHP. Multiple PHP versions allow you to assign different PHP versions to each of your domains. Coupled with automatic upgrades, this ensures that your PHP applications run on the most up-to-date, secured PHP versions.

Post-update actions

EasyApache 4 removed OptMods and no longer supports them. However, in addition to the new RPM actions that EasyApache 4 can execute from its specification file, we created yum-plugin-universal hooks. These new hooks allow for executable actions based on the package name they operate in. For example, if you run a script on an ea-* package, if any updated packages exist in the ea4 namespace, the system executes these scripts.

Optimize images for SEO and website loading speed

image-compression
image-compression
Why Do I need to optimize Images on my Website?

Then Simple and most basic reason is for improving website SEO and load the website faster. The faster the websites is loaded the more SEO traffic you can expect.

How to reduce the load times of pages by loading appropriately sized images.

Diminish file sizes based on where images will be displayed.

Resize image files themselves instead of via CSS.

Save files in appropriate format depending on usage.

Cost benefit ratio: high value

Access needed

90% of most websites are graphics dependent and therefore there are a lot of image files. Leaving these images uncompressed and in the wrong format can drastically slow down your web page load times. So it’s  important to optimize your images.

Optimizing images for the web

The images create using programs like Photoshop and Illustrator look amazing but often the file sizes are very large.

This is because the images are made in a format which makes them easier to manipulate in different ways.

With file sizes upwards of a couple of megabytes per image, if you put these files on your website it would be very slow to load.

Optimizing your images for the web means saving or compiling your images in a web friendly format depending on what the image contains.

Images hold data other than just the pixels we see on the screen.

This data can add unnecessary size to the image which leads to longer load times as the user waits for the image to download.

In terms of cost versus benefit optimizing your images should be near the top of your page speed optimizations if you don’t have them optimized already.

How it work?

Optimizing images for the website can reduce your total page load size upto 80%.

There are two forms of compression that we need to understand, Lossy and Lossless.

Images in a lossy format will look slightly different than the original image when uncompressed.

Keep in mind that this is only visible at a very close look. Lossy compression is good for website, because images use small amount of memory, but can be sufficiently like the original image.

Images in lossless format retain all the information needed to produce the original image.

For this reason these images carry a lot more data and in return are a much large file size.

Can you imagine take a poster size image and using it as a thumbnail? The little 20px by 20px image would take as long to load as the original poster, when we could just be loading a 20px

We can also optimize images for the website by saving them as the appropriate dimensions.

Resizing the image on the webpage itself using CSS is helpful but the issue is the web browser will still download the entire original file, then resize it and display it.

Optimize Your Images

Full optimization of images can be quite an art to perfect as there are such a wide variety of images you might be dealing with. Here are the most common ways to optimize your images for the web.

Reduce the white space around images – some developers use whitespace for padding which is a big no no.

Crop your images to remove any whitespace around the image and use CSS to provide padding.

Use proper file formats –

If you have icons, bullets or any graphics that don’t have too many colours use a format such as GIF and save the file with lower amounts of colours.

If you have more detailed graphics then use JPG file format to save your images and reduce the quality.

Save your images in the proper dimensions.

If you are having to use HTML or CSS to resize your images, stop right there. Save the image in the desired size to reduce the file size.

To resize your images you will have to use some form of program.

For basic compression you can use a simple editing program such as GIMP.

For more advanced optimization you will have to save specific files in Photoshop, Illustrator or Fireworks.

Tools PageSpeed use to test this recommendation –