Thursday, March 26, 2015

Emil Commands

Check any email :

 exim -Mvh 1YaOs6-0007Ol-ME

Saturday, March 21, 2015

Cpanel shows 500 error with php fatal

Updating your suPHP_ConfigPath value in your .htaccess file

Making your php.ini file affect all child folders as well is referred to as making the file "recursive". To make your public_html/php.ini file recursive, edit (or create the file if it doesn't exist) your public_html/.htaccess file and add the following code:
suPHP_ConfigPath /home/username/public_html

Friday, March 13, 2015

Enable SSH and WHM login Alert emails

Enable WHM login Alerts

You can enable this option in CSF firewall configuration.
/etc/csf/csf.conf
WHM >> Plugins >> ConfigServer Security&Firewall > csf – ConfigServer Firewall”.
Just click the “Firewall Configuration
# Send an email alert if anyone accesses WHM via root. An IP address will be
# reported again 1 hour after the last tracked access (or if lfd is restarted)
LF_CPANEL_ALERT = “1”

Enable SSH login Alerts

Login to your server as root user
cd /root
vi .bashrc
Scroll to the end of the file then add the following:
echo ‘ALERT – Root Shell Access (ServerName) on:’ `date` `who` | mail -s “Alert: Root Access from `who | cut -d'(‘ -f2 | cut -d’)’ -f1`” your@yourdomain.com
Replace YourServerName with the handle for your actual server
Replace you@yourdomain.com with your actual email address

Sunday, March 8, 2015

Exim Remove All messages From the Mail Queue

To print a list of the messages in the queue, enter:

# exim -bp

To remove a message from the queue, enter:

# exim -Mrm {message-id}

To remove all messages from the queue, enter:

# exim -bp | awk '/^ *[0-9]+[mhd]/{print "exim -Mrm " $3}' | bash


or
 
 # exim -bp | exiqgrep -i | xargs exim -Mrm

Monday, March 2, 2015

Essential Linux Commands

How to see all folder permissios in linux 
 
ls -l /home [home is directory name]
 
tail -f /usr/local/apache/logs/error_log | grep gemsandj
 
Find Apache logs
 
tail -f /usr/local/apache/logs/error_log 
 
http://thecpaneladmin.com/fix-account-permissions/  
 
 
Apache start 
 
/etc/init.d/httpd start