Monitoring your server in WHM

In this article we will briefly cover the basics of monitoring your server via WHM. By following this process you will learn how to find: service status, resource usage, and Apache stats.

  1. With WHM open in your web browser, (a) type “status” into the search box. This should sort the list to only a few items.
    Navigate to Monitoring
  2. Click “Service Status” from the list. This will open the service status page, here you can view the status of various services and server info.
    monitoring-whm-pt2

    If there is a problem the green checkmark icon will turn into a red ‘x’ icon.
  3. Now, with the same search, click “Apache Status” from the list. This will show you the current state of Apache on the server.
    monitoring-whm-pt3

By following this tutorial you should now know how to monitor your Server’s overall status and the status of various services. As always for our Liquid Web customers the dedicated Sonar Monitoring™ team is monitoring your server 24/7.

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.

    WHMIncludeEditor

  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:”

    EditAllVersions

  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.

RestartApache
 

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.

Considerations

  • 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.

    ApacheStatusPageInWHM

 

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”

How to Install and Configure phpMyAdmin on Fedora 22

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 Fedora 22.
  • I’ll be working from a Liquid Web Self Managed Fedora 22 server, and I’ll be logged in as root.
  • A LAMP stack, meaning Linux, Apache, MySQL and PHP, must be installed on your server.

Continue reading “How to Install and Configure phpMyAdmin on Fedora 22”

How to Install Apache on Fedora 21

The Apache web server is one of the most popular and powerful web servers in the world, due to its 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 21 node.
  • I’ll be working from a Liquid Web Self Managed Fedora 21 server, and I’ll be logged in as non-root user. If you need more information then visit our tutorial on How to Add a User and Grant Root Privileges on Fedora 21.

Continue reading “How to Install Apache on Fedora 21”

How to Install Apache on Fedora 20

The Apache web server is one of the most popular and powerful web servers in the world, due to its 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 20 node.
  • I’ll be working from a Liquid Web Self Managed Fedora 20 server, and I’ll be logged in as non-root user. If you need more information then visit our tutorial on How to Add a User and Grant Root Privileges on Fedora 20.

Continue reading “How to Install Apache on Fedora 20”