×


Blog


Set custom php.ini in FastCGI - How to set it up

This article covers how to set custom php.ini in FastCGI. Basically, FastCGI is the best to manage resources for a high traffic site in shared servers.


To create Custom php.ini with PHP5 under FastCGI:

1. First open .htaccess for the account in question and add the following lines to the bottom of the file:

AddHandler php5-fastcgi .php

Action php5-fastcgi /cgi-bin/php5.fcgi

2. Next, you'll need to source your main server php.ini which is located in /usr/local/lib/. Also note that it needs to have the correct ownership so we'll take care of that too:

cd /home/user/public_html/cgi-bin/

cp -a /usr/local/lib/php.ini .

chown user:user php.ini

3. Next we need to create the wrapper script. Create a file in your current directory (cgi-bin) called php5.fcgi as defined above and add the following:

#!/bin/sh

export PHP_FCGI_CHILDREN=1

export PHP_FCGI_MAX_REQUESTS=10

exec /usr/local/cpanel/cgi-sys/php5

4. Finally, make sure the ownership and permissions are correct on this file:

chown user:user php5.fcgi && chmod 0755 php5.fcgi


An error occurred while reconnecting - Fix this Windows error now

This article covers methods to resolve fix 'An error occurred while reconnecting' Windows error. 


Causes for 'The Local Device Name is already in Use' Error on Windows:

1. Drive mapping has gone wrong – The process of network drive mapping can sometimes produce problems like this one when it comes to drive letters.

2. Some drive letters are unassigned – Some drives may have incorrect or even missing drive letters which causes this error to appear.

3. File and Printer Sharing is disabled – If this option is disabled in any firewall you might be using, networking becomes difficult and full of errors.

4. No space on the server – Users have reported that they had to free up at least a couple of gigabytes on the root drive of the network’s server to get rid of the problem.


To fix 'The Local Device Name is already in Use' Error on Windows:

Remap the Drive Using Command Prompt

Remapping the network drive is the official solution recommended by Microsoft for users facing this problem. However, it has worked for many users and it has become one of the most used methods for this problem. 

Check out the steps to implement this;

1. Search for “Command Prompt” either right in the Start menu or by tapping the search button right next to it. Right-click on the first result which will appear at the top and select the “Run as administrator” option.

2. Users who are using an older version of Windows can use the Windows Logo Key + R key combination in order to bring up the Run dialog box. Type in “cmd” in the box and use the Ctrl + Shift + Enter key combination in order to run Command Prompt as an administrator.

3. Copy and paste the command shown below and make sure you click the Enter key on your keyboard.

net use * /delete

4. After you see that the operation is completed successfully, run the following command:

net use Z: \\server\share /user:username password

5. Make sure you replace the username and password placeholders with the correct username and password. Check to see if the problem is resolved!


Troubleshoot server down issues - How to do it

This article covers how to troubleshoot server down issues. Basically, network issues might cause the Datacenter to go down. This can lead us into some unlucky instances. Troubleshooting server down issues is never an easy task. Whether you have a small home network, or a super connection of thousands of computers, there are meticulous steps you need to take to get your server back up running.


Steps to take when troubleshooting server down issues:

1. ANALYZE YOUR NETWORK INFRASTRUCTURE

You will have a better chance at troubleshooting network problems if you first figure out where everything is connected in the infrastructure.

2. STUDY YOUR NETWORK

If you don't have an infrastructure design to go by, you will have to learn your network’s layout when analyzing your connectivity. Several tools can help you to map out the entire network infrastructure. Tools such as IPCONFIG can aid in finding the problem.

3. CONNECTION IS DOWN

From the network troubleshooting application, find out from the OSI model if all the seven layers are working correctly. Usually, if the first layer doesn’t work the whole connection will be down. Check whether the network cable is plugged in.

4. NO IP ADDRESS

Your server could be down just because of unknown IP address settings. Anon IP address such as 0.0.0.0 or an automatic one that starts with 169.254 will typically result in server down problems. You will need to obtain a valid IP address before you can get your server back up. 

5. NO DNS SERVERS

Without DNS servers configured on your network, all communication will only be possible through an IP address. A server down issue, in this case, might be a broken a line between the router and the internet. 

6. NO DEFAULT GATEWAY

Your servers could be down because there is no default gateway IP address. This breaks the communication between the subnet and the local area network. You will still be able to work as usual on your local servers. 

7. MISCONFIGURED IP SUBNET MASK

A misconfigured subnet mask IP can impede server communication. You can manually configure this IP subnet mask or work with the DHCP server to identify the source if there is a misconfiguration.


Create custom php ini in Litespeed Webserver - How to do it

This article covers how to Create custom php.ini in Litespeed Webserver. Basically, compared to the Apache web server, the Litespeed web server configuration may feel a bit complicated. In hosting environment with cPanel servers, it is necessary to edit the PHP variables for each domain or customer and this can be done using by creating a custom php.ini for each user's home directory. So the clients can change the PHP values according to their requirements.  

There should some steps need to be done on Litespeed admin panel on cPanel/WHM to enable custom php.ini and you can follow the below steps to enable it.


To Create Custom Php.Ini In A Litespeed Webserver:

1. Login into WHM.

2. Select Litespeed Web Server

3. Litespeed Configuration > Admin Console > Configuration > Server > External App > lsphp5

4. Under Environment section >> add “PHPRC=$VH_ROOT”

5. Under “suEXEC User ” section >> add the account username for which custom php.ini has to be enabled.

6. Under “suEXEC Group ” section >> add the group name of the same account.

7. Click save and return to Main >> Litespeed Web server

8. Under Quick Configuration of PHP suEXEC settings,>> Set Enable PHP suExec to yes.

9. After that put custom php.ini in the user’s home directory and check it using a phpinfo page.


Install NDOUtils in CentOS RHEL and fix related error

This article covers how to install NDOUtils in CentOS. NDOUtils is an addon for Nagios Core that allows you to export current and historical data from one or more Nagios Core instances to a MySQL database. NDOUtils is included with Nagios XI. A source in Nagios Network Analyzer is the data collector. Outside of Nagios Network Analyzer a source is the location where data is originating from.


NDOUtils uses the kernel message queue for transferring the data from Nagios to NDOUtils. We are going to increase the default values the Kernel boots with to ensure it operates optimally.

1. Downloading NDOUtils Source

cd /tmp

wget -O ndoutils.tar.gz https://github.com/NagiosEnterprises/ndoutils/releases/download/ndoutils-2.1.3/ndoutils-2.1.3.tar.gz

tar xzf ndoutils.tar.gz

2. Compile NDOUtils

cd /tmp/ndoutils-2.1.3/

./configure

make all

3. Install Binaries

This step installs the binary files.

make install

4. Initialize Database

This prepares the database for NDOUtils.

cd db/

./installdb -u 'ndoutils' -p 'ndoutils_password' -h 'localhost' -d nagios

cd .. 


SSH Servers Clients and Keys - More about it now

This article covers important information about SSH Servers, Clients and Keys. Use SSH keys for authentication when you are connecting to your server, or even between your servers.

They can greatly simplify and increase the security of your login process. 

When keys are implemented correctly they provide a secure, fast, and easy way of accessing your cloud server.


Turn off password authentication Linux:

With SSH key authentication configured and tested, you can disable password authentication for SSH all together to prevent brute-forcing. When logged in to your cloud server.

1. Open the SSH configuration file with the following command.

$ sudo nano /etc/ssh/sshd_config

2. Set the password authentication to no to disable clear text passwords.

PasswordAuthentication no

3. Check that public key authentication is enabled, just to be safe and not get locked out from your server. If you do find yourself unable to log in with SSH, you can always use the Web terminal control panel.

PubkeyAuthentication yes

Then save and exit the editor.

4. Restart the SSH service to apply the changes by using the command below.

$ sudo systemctl restart sshd

With that done your cloud server is now another step along towards security. 

Malicious attempts to connect to your server will results in authentication rejection, as plain passwords are not allowed, and brute-forcing an RSA key is practically impossible.