Apache Performance Tuning: Swap Memory

Reading Time: 3 minutes

Before we get into the details of Apache tuning, we need to understand what happens when a VPS server or Dedicated server goes unresponsive due to a poorly optimized configuration.

An over-tuned server is one that is configured to allow more simultaneous requests (ServerLimit) than the server’s hardware can manage. Servers set in this manner have a tipping point, and once reached, the server will become stuck in a perpetual swapping scenario. Meaning the Kernel is stuck rapidly reading and writing data to and from the system swap file.

Continue reading “Apache Performance Tuning: Swap Memory”

How to Install Mod Fcgid on cPanel’s EasyApache 4 with CloudLinux

Reading Time: 6 minutesWhen it comes to PHP execution, mod_fcgid (also called FCGI) is one of the heavyweight contenders. There are a few rival handlers, like PHP-FPM or mod_lsapi, which come close to matching its execution speed, but they generally leave something to be desired when it comes to fine-tuning and resource consumption. FCGI is built for speed and includes a myriad of Apache directives that can be leveraged for resource regulation. Continue reading “How to Install Mod Fcgid on cPanel’s EasyApache 4 with CloudLinux”

Troubleshooting: Can’t Resolve Hostname

Reading Time: 2 minutesYou may find the “can’t resolve hostname” or “temporary failure in name resolution” error when using retrieval command like wget, cURL, ping or nslookup. There are many reasons why these commands can cause an error, including file corruption.  For the sake of brevity, we look towards commonalities between these commands to solve the issue. These commands connect to the Internet using gateways to communicate and provide information.   If the connection from your local machine, in this case, a CentOS server, is disconnected you’ll likely run into issues trying to access the world wide web. In this troubleshooting tutorial, we’ll show you some common solutions to connectivity issues. Step 1: Amongst many other configuration tasks, the resolv.conf file is used to resolve DNS requests. Manually editing the resolv.conf file to configure name resolution will only do so temporarily. The Network Manager controls this essential /etc/resolv.conf file to create permanent changes. So, we’ll first stop and disable the Network Manager:
Note
Be sure to run these commands as the root user, or a privileged user using sudo before each command.
chkconfig NetworkManager off; service NetworkManager stop   Step 2: The method for permanent changes is to edit the /etc/sysconfig/network-scripts/ifcfg-eth0 file instead of resolv.conf file. Open the file: vim /etc/sysconfig/network-scripts/ifcfg-eth0 Next, we’ll set our DNS IP’s to use Google’s Public DNS (8.8.8.8 & 8.8.4.4). DEVICE="em1" BOOTPROTO="static" DNS1="127.0.0.1" DNS2="8.8.8.8" DNS3="8.8.4.4" GATEWAY="some_ip" HWADDR="hwid" IPADDR="some_ip" IPV6INIT="yes" NETMASK="255.255.255.0" NM_CONTROLLED="yes" ONBOOT="yes" TYPE="Ethernet" Save and quit the file using ESC and :wq.   Step 3: Enable and restart your network, using the commands associated with your server version. CentOS 6, CloudLinux 6, RHEL 6: chkconfig network on service network start   CentOS 7, CloudLinux 7, RHEL 7: systemctl enable network.service systemctl start network.service   Step 4: Test the reachability of a host by using ping, curl, wget or any testing tool of your choice. In our example, we’ve successfully ping’d Google!   ping google.com PING google.com (172.217.4.46) 56(84) bytes of data. 64 bytes from lga15s46-in-f14.1e100.net (172.217.4.46): icmp_seq=1 ttl=57 time=6.65 ms 64 bytes from lga15s46-in-f14.1e100.net (172.217.4.46): icmp_seq=2 ttl=57 time=6.68 ms 64 bytes from lga15s46-in-f14.1e100.net (172.217.4.46): icmp_seq=3 ttl=57 time=6.68 ms You don’t have to rack your brain over connectivity issues!  Liquid Web customers enjoy 24/7 support for our VPS Managed products. Our knowledgeable team of support techs have experience with solving errors of this nature.  Access our support team through a ticket, chat or phone call!

How to Change Your Hostname in Ubuntu 16.04

Reading Time: 5 minutes
Image result for ubuntu logo Times are changing, and quite possibly, your hostname is as well if you are reading this article.  You may have come across a scenario within the business that requires you to change your hostname.  You might ask yourself why you would need to change your hostname? The most common scenarios would be due to a domain name change, your business has changed its course, or because you have thought of something better. Sometimes you might forget to renew the domain names before they expire. Unfortunately, this can be a time when a domain broker purchases the domain name out from under you.  These are agencies that take popular sites and purchase with the intent of holding the domain until their inflated price is met.  As unfortunate as this may be, sometimes it is best to purchase a new domain name for cost efficiency. Continue reading “How to Change Your Hostname in Ubuntu 16.04”

What’s My DNS?

Reading Time: 3 minutes

What is DNS?

If you are new to web hosting, you may have heard the term DNS, but you might not be sure what it means or how it is essential to you. DNS is short for Domain Name System, and it is the process by which the whole Internet organizes and easier way for humans to reach websites. Numbers or IP addresses identify all of the computers/websites connected to the Internet. While computers have no trouble identifying each other using these strings of numbers, it would be challenging for humans if we had to remember a set of numbers for every website we wanted to visit! Fortunately, DNS translates domain names like liquidweb.com to an IP address and back, so all we need to know to find a website is the name. For a more in-depth discussion of the DNS system, see Understanding the DNS Process. You can use the DNS Tree for a quick, visual comparison of the records that exist on all of your nameservers. Making sure your records match across nameservers and that they match your server is an essential part of troubleshooting possible website issues. If you’re error messages like “This site can’t be reached” or “webpage is not available”, the DNS Tree may help you figure out where the problem exists.  

How Do I Check My DNS?

Verifying accurate DNS records is essential for navigating traffic to the correct web server. You can use Liquid Web’s Internet Webhosting Toolkit to view your current, authoritative DNS records. Just go to the toolkit’s site, click on the DNS Tree tab, enter your domain name, and click Submit.

lw dns tree

Note
Our servers will query your domain’s nameservers for the most common DNS record types. If a domain is not registered or if no DNS records exist for the domain, you’ll receive an error message indicating that the records are not available. This may suggest that your nameservers are unavailable for some reason, especially if you are hosting those nameservers on a private server.

domain lookup error

If you have registered your domain and set DNS records our tool will display the results in an easy to see “tree” of records, organized from most general to most specific.

lw dns tree detail

In our example, we are looking up the records for liquidweb.com, so the tree begins with that domain at the far left of the screen.

lw dns tree domain

The next set of records displayed are the Authoritative Nameservers for the domain. These are the servers designated as the holders of the records for this domain. If you want to change the records for this domain, you must change them on these servers. Changing records anywhere else won’t make reflect DNS changes. Your domain can have one, two, or as many Authoritative Nameservers as you would like but most websites use at least two for redundancy and stability.

lw dns tree nameservers

  The next set of entries in the DNS Tree show the Types of records that are available. DNS record types are unique for each kind of DNS function.
  • An “A Record” is used to identify primary IP addresses of given domains.
  • MX Records” are used for email routing and delivery.
  • TXT records” hold additional information about the domain, like SSL validations, DKIM entries, or SPF records.
For more information about DNS record types, see DNS Record Types.

lw dns tree record types

The final “column” of entries displays the actual DNS record. This is typically an IP address for an “A record”, and domain name for an “MX record”, or a string of text for a “TXT record”. Hovering the mouse over a circle will display all of the information for the record in a pop-out window, including the TTL, Type, and Data.

dns tree recordsdns tree popout

              If you’ve made recent changes to your DNS records, the toolkit may be showing an older, or cached, version of the records. The TTL portion of the record indicates how frequently the DNS system should update its records. TTL is shown in seconds, so a typical setting of 3600 means that servers will be asked to update your records every 6 minutes. The delay that occurs during this period is referred to as propagation. Some DNS changes, like nameserver changes, can take up to 72 hours to propagate, so if you are going to be making changes to your DNS records, you’ll want to lower your TTL values for a quick update. For more information on reducing your TTLs, see How To: Lowering Your DNS TTLs. If you need additional help, Liquid Web customer’s can contact the Most Helpful Humans in Hosting via ticket, chat, or phone (1-800-580-4985) at any time and we’ll do our best to make sure everything is working correctly.  

How Do I Use Liquid Web’s Hosting Toolkit?

Reading Time: 2 minutesIf there is one truth in the world of web hosting, it is that we always need more information. Information about configurations, dedicated servers, VPS servers, connections, delivery speeds and networking is essential in troubleshooting and optimizing our web presence. While this kind of information can be gathered from various providers and sites across the Internet, Liquid Web has developed a one stop shop toolkit to gather some of the most vital troubleshooting tools in one convenient interface designed to make your life easier. The Liquid Web Internet Webhosting Toolkit provides you with the data you need to verify connectivity, identify DNS issues, and test web page performance. We’ll continue to develop and share new tools that will make your job easier; it’s one of the ways that we are working to be the Most Helpful Humans in Hosting. Continue reading “How Do I Use Liquid Web’s Hosting Toolkit?”

Troubleshooting: MySQL/MariaDB Error #1044 & #1045 Access Denied for User

Reading Time: < 1 minuteWhen using PhpMyAdmin, it’s essential to have the correct user permissions to create edits/writes to the database.  Otherwise, insufficient permissions can lead to  errors like the ones pictured below “#1044 – Access denied for user …[using password: YES]” and “#1045 – Access denied for user…[using password: YES]”.  In our tutorial, we’ll show you how to correct this issue using the command line terminal.  Let’s get started! Continue reading “Troubleshooting: MySQL/MariaDB Error #1044 & #1045 Access Denied for User”

Troubleshooting: Locked Out of RDP

Reading Time: 4 minutes

How Do I Get Back Into RDP?

You may be working from a local machine that has an IP that is not scoped on that RDP port, making it impossible for you to gain remote access to add the IP address to the RDP rule’s scope. Do not fret; there is a simple and quick way to add your IP to the RDP scoping (or any other entities such as MySQL or MSSQL) right through your Plesk interface in your local browser. You can watch this video, or scroll down for step-by-step directions.

For security purposes, it is always recommended that you scope off your Remote Desktop Protocol (RDP) connection on your server. Putting a scope on the RDP rule in the Windows Firewall will allow only the indicated  IP addresses to gain access to the server through Remote Desktop Protocol. The issue is that many of us do not have static IP addresses, but rather Dynamic IP addresses. This means that while once our IP address may be 120.32.111.01, it may change to something like 95.42.121.01 later. So if you were to add 120.32.111.01 to the RDP firewall for a customer or a system administrator, then you may need to add another rule for a different IP address.

Adding Your IP in Plesk

Step 1: Log in to Plesk

First, we need to make sure we know how to get to that Plesk login page. By default, the Plesk login page is https://<YourServerIP>:8443. For example, https://127.0.0.1:8443

We should arrive at a page with this in the center. Go ahead and type in Admin for the username and your password for Plesk. Usually, that password is set up by our team and is the default Server Administrator Password. Sometimes the username is Administrator, depending on a few variables. But one of the two usernames should be fine.

Plesk login

Step 2: Tools & Settings

The first thing we need to do after we log into Plesk through the previous page is to navigate to the Firewall Rules. Go ahead and click on Tools & Settings. It will be located in the right sidebar near the bottom as shown below.

plesk tools and settings

Step 3: Firewall

Once we pull up Tools & Settings go ahead and click on our destination, Firewall. You will find that option under the Security section. It will be the second option, just under Security Policy.

firewall tools and settings

Step 4: Firewall Rules

After we are in the Firewall management, go ahead and click on Firewall Rules. This is where we will add the rule to allow a certain IP address to gain RDP access.

firewall management

Step 5: Add a Firewall Rule

Under Tools, after going into the Firewall Rules, we will see the option labeled Add Firewall Rule. Go ahead and click on that, bringing us to our next step.

firewall add rule

Step 6: Add Detail the New Rule

This is the page that we see after clicking on Add Firewall Rule. It can seem to be complicated and intimidating for some beginner level System Administrators, but it is simple.

add a new firewall rule
firewall profiles

If you or your client are not sure what that IP address that needs RDP access is, Liquid Web has a great site to visit that will display your IP address.

Note:

Here is an example of what you will find at https://ip.liquidweb.com.

While this particular example IP will not be the one that the customer or the System Administrator will see, (when visited on the local machine) the page will display the IP address that needs to be added to the rule for this RDP session to connect. That will be the only information that will be displayed on this page. Simply copy that IP address and use it in the instructions below.
ip address

remote ip address

Once you enter the IP address into the text box under Remote addresses, you do need to click the ADD button before clicking on OK.

remote ip address example

As mentioned above, after clicking the ADD button while the IP address is entered into the Add an IP address or a network text box, it will be placed into the left text box. After that step, you will then be able to click OK to apply this rule to the firewall for the server.

 

Step 7: Connect to RDP

The individual at that IP address can now access the server via RDP. If you would like to review an article explaining how to use Remote Desktop Connection, or if you need further assistance, you can locate more info at our internal help center after logging into your Liquid Web account.

rdp connection login screen

Congratulations! You now know how to add an IP address to an RDP rule that will allow a user to connect if the RDP is scoped off to the public. This can be done many times. Although Plesk does not allow you to edit the rule, you will have to create a new one each time. But this shouldn’t cause any issues. Also, keep in mind that this method can be used for any port, including MySQL and MSSQL.

The Most Helpful Humans In Hosting™

We pride ourselves on being The Most Helpful Humans In Hosting™! Our support staff is always available to assist with any Dedicated, Cloud, or VPS server issues 24 hours a day, 7 days a week 365 days a year.

We are available, via our ticketing systems at support@liquidweb.com, by phone (at 800-580-4986) or via a LiveChat for whatever method you prefer. We work hard for you so you can relax.

Using a Cron Wrapper Script

Reading Time: 4 minutesThis tutorial is intended to do two things: to expand on the Cron Troubleshooting article; and to give an overview of a simple scripting concept that uses the creation of a file as a flag to signify something is running. This is primarily useful when you need to run something continuously, but not more than one copy at a time. You can create a file as a flag to check if a job is already running, , and in turn, check for that flag before taking further action. Continue reading “Using a Cron Wrapper Script”

How to Use Ansible

Reading Time: 8 minutesAnsible symbolAnsible is an easy to use automation software that can update a server, configure tasks, manage daily server functions and deploys jobs as needed on a schedule of your choosing. It is usually administered from a single location or control server and uses SSH to connect to the remote servers. Because it employs SSH to connect, it is very secure and, there is no software to install on the servers being managed. It can be run from your desktop, laptop or other platforms to assist with automating the tedious tasks which every server owner faces. Continue reading “How to Use Ansible”