What is a LAMP stack?

The LAMP stack is the foundation for Linux hosted websites is the Linux, Apache, MySQL and PHP (LAMP) software stack.

The Four Layers of a LAMP Stack

Linux based web servers consist of four software components. These components, arranged in layers supporting one another, make up the software stack. Websites and Web Applications run on top of this underlying stack. The common software components that make up a traditional LAMP stack are:

  • Linux: The operating system (OS) makes up our first layer. Linux sets the foundation for the stack model. All other layers run on top of this layer.
  • Apache: The second layer consists of web server software, typically Apache Web Server. This layer resides on top of the Linux layer. Web servers are responsible for translating from web browsers to their correct website.
  • MySQL: Our third layer is where databases live. MySQL stores details that can be queried by scripting to construct a website. MySQL usually sits on top of the Linux layer alongside Apache/layer 2. In high end configurations, MySQL can be off loaded to a separate host server.
  • PHP: Sitting on top of them all is our fourth and final layer. The scripting layer consists of PHP and/or other similar web programming languages. Websites and Web Applications run within this layer.

We can visualize the LAMP stack like so:

Applying what you’ve learned

Understanding the four software layers of a LAMP stack aids the troubleshooting process. It allows us to see how each layer relies on one another. For instance; when a disk drive gets full, which is a Linux layer issue. This will also affect all other layers in the model. This is because those other layers rest on top of the affected layer. Likewise, when the MySQL database goes offline. We can expect to see PHP related problems due to their relationship. When we know which layer is exhibiting problems. We know which configuration files to examine for solutions.

Some Alternatives

The four traditional layers of a LAMP stack consist of free and open-source products. Linux, Apache, MySQL and PHP are the cornerstone of a free, non-proprietary LAMP stack. There are several variants of the four stack model as well. These variants use alternative software replacing one or more of the traditional components. Some examples of these alternatives are:

  • WAMP: Windows, Apache, MySQL & PHP
  • WISA: Windows, IIS, SQL & ASP.net
  • MAMP: MacOS, Apache, MySQL & PHP

You can explore these alternative software stacks in greater depth using online resource. The LAMP stack Wiki is a great place to start:

How can we help?

The LAMP stack is an industry standard and is included in all of our Core-Managed and Fully Managed Linux based servers. Our support teams work hand in hand with the LAMP stack on a daily basis. You can rest assured we are at your disposal should you have questions or concerns. To learn more you can browse our latest product offerings.

Installing and using UFW on Ubuntu 16.04 LTS

On an Ubuntu server the default firewall management command is iptables. While iptables provides powerful functionality it’s syntax is often seen as complex. For most users a friendlier syntax can make managing your firewall much easier.

The uncomplicated firewall (UFW) is an alternative program to iptables for managing firewall rules. Most typical Ubuntu installations will include UFW by default. In cases where UFW isn’t included it’s just a quick command away! Continue reading “Installing and using UFW on Ubuntu 16.04 LTS”

Choosing Your Cloud Sites Technology Setup

Behind Cloud Sites, racks full of both Linux and Windows servers power over 100,000 sites and applications. Every Windows-based page is served from clusters built and optimized especially for Windows, and every Linux-based page is served from clusters built and optimized especially for Linux. We use advanced load balancing technologies to automatically detect the type of technology you are running and route each request to the proper pool of servers.

This is a great example of the power of cloud computing, since you no longer have to make a hosting choice between Linux and Windows. Both PHP and .NET are included, allowing you to choose the technology you need site by site.
Continue reading “Choosing Your Cloud Sites Technology Setup”

Error: sec_error_ocsp_try_server_later [SOLVED]

Pre-Flight Check

  • These instructions are intended specifically for solving the error: “sec_error_ocsp_try_server_later”.
  • This error can be displayed anytime a user visits a secure website using the https:// protocol in Firefox or Internet Explorer. It does not indicate a problem with the site itself, but occurs due to a change in the method these specific browsers use to check for revoked SSL certificates.
  • We’ll be logging into WebHost Manager as root to resolve the error.

Certificate revocation checks can help prevent you from accidentally visiting a site that’s using a compromised security certificate. Historically, the web browser typically would check a Certificate Revocation List directly. But the newer process, known as OCSP stapling, relies on the web server to make the check and pass along the Certificate Authority’s cached response to the browser. Because this is a newer process and not yet an Internet standard, some servers may require a minor configuration change in order to comply with the browser’s request. If you see this error when connecting to a site on your cPanel server, you can easily enable OCSP stapling on your server directly from WHM.

Step #1: Open the Apache Include Editor in WHM

  1. In WHM, locate and select Apache Configuration in the left menu (you can start typing “apache” to quickly narrow down the choices) to open the Apache Configuration page.


  2. Scroll down to Include Editor and click on it.
  3. On the Include Editor page, scroll down to the Pre VirtualHost Include section and select All Versions underneath “I wish to edit the Pre VirtualHost configuration include file for:”


  4. Scroll past any directives that may be listed in the include, and add the following two lines at the very bottom:

    SSLUseStapling on
    SSLStaplingCache shmcb:/tmp/stapling_cache(128000)

    Note: Do not edit or alter any other directives that may be listed; make sure you’re simply adding the two lines above to the very bottom of the file.
  5. Click on the blue Update at the bottom to save the include file.

Step #2: Restart Apache to Apply the Settings

All you need to do to apply the new settings is to restart Apache. WHM makes that easier by presenting you with a Restart Apache button once you’ve saved your changes in the previous step.


How To List Which Apache Modules are Enabled on Fedora 23

The Apache web server is one of the most popular and powerful web servers in the world due in part to its ease of administration and flexibility. This flexibility is a result of Apache’s modular design, which allows for such features as URL rewriting for native SSL encryption natively. Administrators can modify Apache to meet their needs by adding or removing modules as needed.

Pre-Flight Check

  • These instructions are intended specifically for viewing enabled Apache modules on Fedora 23. The process is the same on most Linux servers running Apache.
  • In this case, we’ll be working as root on a Liquid Web Self Managed Fedora 23 server running Apache 2.4.

Viewing Loaded Apache Modules

For a list of all loaded Apache modules, run:

httpd -M

To see the list in alphabetical order, run:

httpd -M | sort

On some versions of Linux operating systems, you can substitute “apachectl” for the “httpd” in those two commands to achieve the same result.

How To Install Apache on Fedora 23

Apache is the world’s most popular web server, due in part to its power, ease of administration, and flexibility. In this tutorial we will install Apache on a server that doesn’t have a web server or database server already installed.

Pre-Flight Check

  • These instructions are intended for installing Apache on a single Fedora 23 node.
  • We’ll be working from a Liquid Web Self Managed Fedora 23 server, and we’ll be logging in as non-root user. If you need more information, then visit our tutorial How to Add a User and Grant Root Privileges on Fedora 23.

Step #1: Install Apache

First, we’ll clean up our package data:

sudo dnf clean all

That should produce output similar to the following:

[root@host ~]# sudo dnf clean all
Cleaning repos: fedora stable-arch updates stable-noarch stable-generic
Cleaning up Everything

As a matter of best practice we’ll now update our packages as well:

sudo dnf -y update

Installing Apache is as simple as running just one command:

sudo dnf -y install httpd

Step #2: Allow Apache Through the Firewall

Allow the default HTTP and HTTPS port, ports 80 and 443, through firewalld:

sudo firewall-cmd --permanent --add-port=80/tcp

sudo firewall-cmd --permanent --add-port=443/tcp

Now reload the firewall for the new settings to take effect:

sudo firewall-cmd --reload

You should see a “”success” message after each of those commands.

Step #3: Configure Apache to Start on Boot

First, start Apache:

sudo systemctl start httpd

Set Apache to start at boot:

sudo systemctl enable httpd

That command should produce output similar to the following:

[root@host ~]# sudo systemctl enable httpd
Created symlink from /etc/systemd/system/multi-user.target.wants/httpd.service to /usr/lib/systemd/system/httpd.service.

To check the status of Apache:

sudo systemctl status httpd

To stop Apache:

sudo systemctl stop httpd

How To Boost Web Server Performance with Nginx and Apache

Apache is the most commonly used web server software on the Internet, and for good reason.

Its long history, general reliability, thorough documentation and active support community have helped it grow to include support for nearly anything a web developer can think to throw at it. But Apache’s universal support has not come without some trade-offs.

Why Apache Alone May Not Meet Your Needs

Apache excels at serving web pages, but its resource requirements (particularly memory) increase as it’s given more to do, thanks to the way Apache manages processes. Apache’s process management is governed by its Multi-Processing Module (MPM). The most common are prefork, worker, and event.

Each time a new request comes in, Apache creates a new process to handle it.

  • In prefork mode, each process contains a single thread (the code which runs inside of a process).
  • In worker mode, each process can contain multiple threads, each handling a single connection.
  • In event mode, each process can contain multiple threads, but each is able to handle more than one connection at a time.

Regardless of the MPM, new processes still are being created to handle new incoming requests (although worker creates fewer than prefork, and event creates fewer than worker).

As requests keep coming in and new processes are created to handle them, CPU and memory usage continue to increase. That drives up load, slows the server down, and ultimately (should the amount of incoming requests far exceed the server’s capabilities) could cause it to become unresponsive. With Apache, scaling up typically requires adding RAM or CPU cores to cope with greatly increased traffic.

And that’s the essential problem Nginx aims to solve: Scalability.

Unlike Apache, Nginx does not create new processes to handle incoming requests. It runs with a set number of processes, typically only one per CPU core, and each of its few processes uses a single thread to handle many requests (potentially thousands) at the same time.

Because of this, Nginx’s resource requirements don’t tend to increase with incoming requests as do Apache’s. And thanks to its small footprint, it’s also able to do the job considerably faster.

One Server’s Weakness Is Another’s Strength

While Nginx’s processes management can be much more efficient and it can serve pages at lightning speed, it’s important to note that the potential performance gains with Nginx are most dramatic when serving static content.

That’s because, unlike Apache’s all-in-one approach, Nginx can serve only static content natively (html, images, javascript and css, etc.). To keep it as lightweight as possible, Nginx relies on separate applications such as PHP FastCGI Process Manager (FPM), Tomcat, or Apache to serve dynamic content.

Unless your site is mostly comprised of static pages, you may decide that there’s not a tremendous amount to be gained by switching from Apache to Nginx outright, given that you’d still need to rely on another application to serve the dynamic content.

And that’s the beauty of using the more-powerful Apache and the more-nimble Nginx together.

In terms of resource usage, Apache doesn’t really care what type of content it’s serving. Processes are created and threads are spun off based only on the number of incoming requests. That makes it somewhat less than ideal for serving extremely large amounts of small, static resources.

By allowing Nginx to serve the static content and pass requests for dynamic content to Apache, you can (for a small amount of overhead up front) effectively eliminate the drain on resources that otherwise would have been caused by having Apache serve all that static content.

Meanwhile, Nginx is caching as it serves, making future requests that much faster still.

This setup, in which Nginx listens on the standard web port (typically 80) and transparently passes requests to the appropriate server, is called a reverse proxy configuration.

Depending on your site’s composition and the number of static resources served, you could find that pairing Nginx and Apache can yield dramatic results.


  • Apache, assuming it already is installed and running, would need to be configured to run on another port.
  • After switching the Apache port, sites on the server would not be accessible at their normal URLs until Nginx is installed, properly configured, and running.
  • Nginx handles virtual hosts (vhosts) differently than Apache, and each existing virtual host entry would need to be recreated for Nginx.
  • Some control panel software, such as cPanel/WHM, does not officially support Nginx (although WHM/cPanel plugins are available).
  • The installation, configuration, troubleshooting and maintenance of Nginx is not supported by Liquid Web on any platform; do not attempt to install any software or modify any configuration files unless you have fully researched the process and know how to address any potential issues that may arise.

Find More Information in Our Knowledge Base


How To Check the Version of Apache

Apache version 2.0 is necessary to take advantage of key features not available in older versions. Among them are:

Checking the Apache Version from CLI

You can easily determine which version of Apache your server is running from the command line with:

httpd -v

Running that command will give you output that will look like this:

[root@host]# httpd -v
Server version: Apache/2.4.16 (Unix)
Server built: Dec 23 2015 11:28:39
Cpanel::Easy::Apache v3.32.6 rev9999

In this case, Server version shows that the server is running Apache 2.4.16.

Checking the Apache Version from WHM

You also can check the Apache version from WebHost Manager:

  1. In WHM’s left menu, locate the Server Status section and click on Apache Status. You can begin typing “Apache” in the search menu to quickly narrow the choices.
  2. The current Apache version will be displayed next to Server Version on the Apache Status page. In this case, it’s version 2.4.16.



How to Install and Configure phpMyAdmin on Ubuntu 15.04

phpMyAdmin is an open source tool used for the administration of MySQL. In addition to offering the capability to perform administration tasks such as creating, editing, or deleting databases, and managing users and permissions, phpMyAdmin provides a graphical user interface to do all of these tasks and more.

Pre-Flight Check

  • These instructions are intended specifically for installing phpMyAdmin on Ubuntu 15.04.
  • I’ll be working from a Liquid Web Self Managed Ubuntu 15.04 server, and I’ll be logged in as root.
  • A LAMP, Linux, Apache, MySQL and PHP, must be installed on your server.

Continue reading “How to Install and Configure phpMyAdmin on Ubuntu 15.04”