Mod_Security disable

If you want to disable security for one singled domain name you can do it by editing virtualhost in httpd.conf

You can add the below setting in apache’s virtualhost for the domain name

You need to add below rule to disable mod_security

<IfModule mod_security2.c>

SecRuleEngine off

</IfModule>

 

 

An unexpected error occurred. Something may be wrong with WordPress.org

Are you getting error below error in wordpress while installing plugin ?

“An unexpected error occurred. Something may be wrong with WordPress.org”  The solution for this issue is to check file wp-config.php

While troubleshooting issue I see the error was in wp-config.php

I commented out below settings to fix this issue

/** EXAMPLE – proxy settings */
#define(‘WP_PROXY_HOST’, ‘proxy.url.com’);
#define(‘WP_PROXY_PORT’, ‘1234’);
#define(‘WP_PROXY_USERNAME’, ”);
#define(‘WP_PROXY_PASSWORD’, ”);
#define(‘WP_PROXY_BYPASS_HOSTS’, ‘localhost’);

This issue got fixed once I commented the above settings.

 

Disable cphulkd in cpanel server

Sometime you may face issue while logging to WHM where password does not work but via SSH password work  The issue in cpanel server is due to cphulkd which is one of the security feature.

to get it password working you need to ssh and disabled cphulkd using below commands
root@server [~]# /usr/local/cpanel/etc/init/stopcphulkd
Waiting for cphulkd.pl,cPhulkd,cphulkd to shutdown ….. terminated.

root@server [~]# /usr/local/cpanel/bin/cphulk_pam_ctl –disable

Now you can login to server via WHM

 

 

How to remove a logical volume

SSH to server and use the below steps

Check active volume first using

[root@load ~]# lvscan
ACTIVE            ‘/dev/vg_load/lv_root’ [50.00 GiB] inherit
ACTIVE            ‘/dev/vg_load/lv_home’ [53.80 GiB] inherit
ACTIVE            ‘/dev/vg_load/lv_swap’ [7.50 GiB] inherit

Say you want to remove the volume /dev/vg_load/lv_home

Type the below command

[root@load ~]# lvremove /dev/vg_load/lv_home
Do you really want to remove active logical volume lv_home? [y/n]: y
Logical volume “lv_home” successfully removed

Now the logical volume is deleted

which you can confirm using

[root@load ~]# lvscan
ACTIVE            ‘/dev/vg_load/lv_root’ [50.00 GiB] inherit
ACTIVE            ‘/dev/vg_load/lv_swap’ [7.50 GiB] inherit
[root@load ~]# lvdisplay
— Logical volume —
LV Path                /dev/vg_load/lv_root
LV Name                lv_root
VG Name                vg_load
LV UUID                jFKRVb-kzMk-bOkE-DZIR-T5PW-fkyf-Tb6txr
LV Write Access        read/write
LV Creation host, time load.onlinesupport4u.in, 2014-04-07 00:28:58 -0400
LV Status              available
# open                 1
LV Size                50.00 GiB
Current LE             12800
Segments               1
Allocation             inherit
Read ahead sectors     auto
– currently set to     256
Block device           253:0

— Logical volume —
LV Path                /dev/vg_load/lv_swap
LV Name                lv_swap
VG Name                vg_load
LV UUID                zNsC2f-9vxE-9cgA-6eFv-0Yrk-JWqG-GFEsId
LV Write Access        read/write
LV Creation host, time load.onlinesupport4u.in, 2014-04-07 00:29:30 -0400
LV Status              available
# open                 1
LV Size                7.50 GiB
Current LE             1920
Segments               1
Allocation             inherit
Read ahead sectors     auto
– currently set to     256
Block device           253:1
 

Domain name Transfer

To transfer the domain name from your old domain registrar to us                                             Please apply using below URL

Once done please make sure the at your old domain registrar

1) You need to disable the privacy Protection                                                                                  2) Disable Theft Protection                                                                                                                 3) Get the EPP or Authorization code and email it to us at support@onlinesupport4u.in along with domain name

Domain name transfer take minimum 5 days to get transferred.

 

Adding a custom php.ini cPanel account

To make your account in cpanel  server have custom php.ini for all subfolder                       You need to use below code steps

1)   Login to server via SSH

2) scp /usr/local/lib/php.ini  /home/cpanelusername/public_html/

3)   vi /home/cpanelusername/public_html/.htaccess

Add below code

suPHP_ConfigPath /home/pankaj12/public_html
<Files php.ini>
order allow,deny
deny from all
</Files>

Once done custom php.ini should be available for all accounts

 

 

 

 

FATAL: Test install failed cpanel

 

If you get below fatal error while updating cpanel

 

[20140325.101511] ***** FATAL: Test install failed:     package cpanel-php54-ingo-3.1.2-3.cp1142.noarch is already installed
[20140325.101511]   The Administrator will be notified to review this output when this script completes
[20140325.101511] ***** FATAL: Error testing if the RPMs will install: Died at /usr/local/cpanel/scripts/updatenow.static-cpanelsync line 14050.
[20140325.101511]   see http://go.cpanel.net/rpmcheckfailed for more information
[20140325.101511]   The Administrator will be notified to review this output when this script completes

SSH to server and run below scripts

#     /scripts/check_cpanel_rpms

#           /usr/local/cpanel/scripts/check_cpanel_rpms –fix

 

This should fix all  RPM issues and cpanel should update fine now

 

 

 

 

“perl: warning: Setting locale failed”

This post shows a simple way of fixing  warning when running perl in linux.

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_CTYPE = “UTF-8”,
LANG = “en_US.UTF-8”
    are supported and installed on your system.
perl: warning: Falling back to the standard locale (“C”).

Solution:

on your home directory:

1. Edit your user bash_profile

vi .bash_profile

2. Insert the following:

export LANGUAGE=en_US.UTF-8

export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8

3. Reload your Bash Profile
# source  .bashrc

This should fix the warning you were getting

 

Lynx file “/etc/lynx.lss” is not available.

Are you getting below error in cpanel for cron  Lynx file “/etc/lynx.lss” is not available” in cpanel server ?  You can fix it using below mentioned setting

 

# vi /var/cpanel/exim.conf.deps   and append it and add below entries                             /etc/lynx.lss

Now Save file and quit and error should dissappear

 

 

 

 

 

Wrong mailbox quota in cPanel

If your cpanel is showing wrong mailbox quota than the actual usage 

You  need to Do the following steps to get it fixed.

Login to your server with root user and check the actual usage of email account

#cd  /home/username/mail/domain.rld /

#du -sch emailaccount

If you found the difference in actual usage and cpanel results then

#cd /home/username/mail/domain.com/emailaccount

# rm -f maildirsize

Now login to your cpanel >> email >> email account option > Reset Quota  and reset  the quota of the account.