Tag Archives: cPanel

14Feb/18

How to disable AutoSSL notifications to the customers cpanel account emails

Recently many of our customers had asked us how they can disable AutoSSL notifications to the end user cpanel account emails. So we guys made a reasearch on this and got the cpanel forum link which this discussion was already going on and saw a script.

Save the below to /root/autossldisable.sh, chmod 755 autossldisable.sh and then run it with ./autossldisable.sh

#!/bin/bash
cd /var/cpanel/users
for user in *
do
    cpapi2 --user=$user CustInfo savecontactinfo notify_autossl_renewal=0 notify_autossl_renewal_coverage=0 notify_autossl_expiry_coverage=0 notify_autossl_expiry=0 notify_ssl_expiry=0
done

This will disable  5 AutoSSL notices off for every user on the server.

Hope this helps

Update : Good news is that by Cpanel 70 version, you will have these options available at Manage Autossl section in the WHM

Reference and Courtsey for the above script : forum.cpanel.net

Reference Link for full discussion : https://forums.cpanel.net/threads/ssl-notifications-in-cpanel-68.614395/

 

 

 

 

20Jun/17

Recompile PHP 5.3 in ntPHPselector version 4

ntPHPselector plugin allows user to select preferred PHP version per directory on the same domain. Our new ntPHPselector version 4  released for the cPanel servers with EasyApache 4 version, which support php versions 5.3, 5.4, 5.5, 5.6, 7.0 and 7.1. By default 5.3 is disabled. You need to recompile it after enabling it from “Settings” tab after the installation.

ntPHPselector manually recompile the php version 5.3, since it is removed from EasyApache 4. You need to recompile the php version 5.3 using from your end using the interface available inntPHPselector WHM module.  Continue reading

14Jun/16

Move cagefs-skeleton directory from /usr/share to another partition

CageFS is a virtualized file system and a set of tools to lock each system user in its own ‘cage’. Each customer will have its own fully functional CageFS, with all the system files, tools, etc.  For a cageFS enabled user only safe binaries are available, user will not see any other users  etc are the main benefits of CageFS.

CageFS creates individual namespace for each user, making it impossible for users to see each other’s files and creating high level of isolation. These safe files for each users are created by default on a folder location /usr/share/cagefs-skeleton.

Sometimes you need to move this cagefs-skeleton directory  from /usr/share to another partition like /home due to low free disk space available in the /usr partition. Below are the steps we used to achieve the same.

# cagefsctl --disable-cagefs 

This command will disable cagefs in the server.

 #  cagefsctl --unmount-all

This command will unmount all mount points created by cagefs.

To ensure all mount points created by cagefs are unmounted successfully please issue below command.

# cat /proc/mounts | grep cagefs 

if you see any cagefs entries, execute “cagefsctl –unmount-all” again and cagefs still exists please issue below command.

# /usr/share/cagefs-plugins/hooks/jail_shell_disable.sh

# mv /usr/share/cagefs-skeleton /home/cagefs-skeleton 

This command will move the folder from /usr to /home (which is having more free disk space).

 #  ln -s /home/cagefs-skeleton /usr/share/cagefs-skeleton

This commnad will create a softlink from /usr/share/cagefs-skeleton to /home/cagefs-skeleton where the actual files exits.

 # cagefsctl --enable-cagefs

This command will enable cagefs in the server.

If we doing this in cPanel servers, then in cPanel WHM choose “Server Configuration” and go to “Basic cPanel/WHM Setup”, then change Additional home directories default value to blank not “home”. If we haven’t set this option, then cPanel will create new accounts in incorrect places.

We encourage your valuable comments below if you encounter any issues while following this article.

11May/16

Install WordPress Using cPanel cPAddon Option.

WHM is famous web-hosting control panel that are used for creating websites, email accounts, create database etc using their control panel. This is will lower the head ache of web hosting owners.

WordPress is a web software that are used commonly for website creation specifically for blogs, apps etc. Many of them are opting WordPress because of simplicity. There are many people that have a requirement of one click install for wordpress. So in this article we are trying to explain how we can enable and install wordpress using the cPAddon option available in WHM/cPanel.

    •  Log into WHM control panel
    •  Go to Home »cPanel »Install cPAddons Site Software
    •  Select WordPress from the list and click “Update cPAddon Config ” option.
      wordpress1
    • Once the update completes, go to Home »cPanel »Manage cPAddons Site Software and
      make sure WordPress is checked, and click “Update Moderation”.

wordpress2

  • Now WordPress is available to installed through cPanel of each websites. So log
    into cPanel for your domain. go to Site Software option >> select wordpress >>
    Fill up the necessary information >> Click Submit Moderation Request
  • Now Go back to WHM >> Home »cPanel »Manage cPAddons Site Software and approve
    the wordpress install request.
  • Once approved the WordPress should be installed under the website with in few
    minutes.
10Feb/16

ntPHPselector :: Released v3.0.0 Beta

The new version of ntPHPselector is ready for Centos 6 servers. It is not compatible with Centos 7 servers. If you are using Centos 6, you can update the plugin to the latest version using the following commands.

#Removed, since new version is released Click here

cd /usr/local/src
wget -N https://nixtree.com/download/free/ntphpselector_manage_beta.sh
sh ntphpselector_manage_beta.sh update

It will install the new version ( 5.6 ) and update the other version to the latest release. So make sure to run this in screen and it take time to complete, since it reuqire to recompile/update all the php versions installed in the server. Continue reading

14Sep/15

cPanel/WHM Successful logins

For getting the successful cPanel/WHM logins, using the following commands.

For getting the successful cPanel logins.

cat /usr/local/cpanel/logs/session_log | grep "myuser" | grep "NEW .*app=cpaneld" 
# "myuser" is cPanel username

xx.xx.xx.xx [09/11/2015:13:17:40 -0000] NEW myuser:bOMyuserz8hKvThis1XUgnISnh4AWMMXSampleKgHE3lString1JpnOSiK5a45t3 address=122.165.84.98,app=cpaneld,creator=myuser,method=handle_form_login,path=form,possessed=0

For gettign successful WHM logins

cat /usr/local/cpanel/logs/session_log | grep "root" | grep "NEW .*app=whostmgrd" 
# Use required WHM user instead of "root"

xx.xx.xx.xx [09/05/2015:07:22:39 -0000] NEW root:KGJsPXy_h243av2XchbPGBajfsSDj0eRz4ryHIj_tGZtYODFSZVb5s4rkdx20LJd address=xx.xx.xx.xx,app=whostmgrd,creator=root,method=handle_form_login,path=form,possessed=0
15Feb/15

Prevent .htaccess file modification while running easyapache

Most of the time, the recompilation process of Apache/php with Easyapache with WHM/cPanel server will be effected the users’ .htaccess file. Most probably the entries like “AddHandler” will be commented state.

We can prevent the .htaccess file modification from the WHM tweak settings.

In WHM-> Server Configuration -> Tweak Settings -> System
set
Depth to recurse for .htaccess checks = 0

23Jul/14

Error : “Identifier removed: couldn’t grab the accept mutex” in apache error logs

Apache was getting stopped automatically with the below logs in the Apache Error log:

[Tue Jul 22 22:29:35 2014] [alert] Child 30758 returned a Fatal error… Apache is exiting!
[Tue Jul 22 22:29:35 2014] [emerg] (43)Identifier removed: couldn’t grab the accept mutex
[Tue Jul 22 22:29:35 2014] [emerg] (43)Identifier removed: couldn’t grab the accept mutex
[Tue Jul 22 22:29:35 2014] [emerg] (43)Identifier removed: couldn’t grab the accept mutex

These type of errors occur on systems low on memory or file handlers.The AcceptMutex directives sets the method that Apache uses to serialize multiple children accepting requests on network sockets.

One suggested resolution for the error message would be to try adding the following line to /usr/local/apache/conf/httpd.conf file:

AcceptMutex fcntl

If you add this above “<IfModule prefork.c>” in tht file, you could then try running these commands to distill the change and restart Apache:

Continue reading

11Jun/14

Install ImageMagick on cPanel Server

ImageMagick® is a software suite to create, edit, compose, or convert bitmap images. It can read and write images in a variety of formats (over 100) including DPX, EXR, GIF, JPEG, JPEG-2000, PDF, PNG, Postscript, SVG, and TIFF. Use ImageMagick to resize, flip, mirror, rotate, distort, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bézier curves.

Install ImageMagick on cPanel Server

Check the php.ini file location.

php -i | grep php.ini

Check the extension imagick enabled in php.ini.

grep imagick.so /usr/local/lib/php.ini

Install ImageMagick using cPanel Scripts.

/scripts/installimagemagick

Confirm the ImageMagick installation.

grep imagick.so /usr/local/lib/php.ini