To get a copy of every mail
To get a copy of every mail send from a mail , to someaddress@somedomain.com Add the following to etc/exim.filter [...]
PHP 5 Local
As php5 compiled in the cgi mode customers cannot to use .htaccess directives like php_admin, php_value, php_flag. In [...]
Open SSL
wget http://www.openssl.org/source/openssl-0.9.7d.tar.gz tar zxf openssl-0.9.7d.tar.gz cd openssl-0.9.7d ./configure --prefix=/usr make make test make install ./configure make make test [...]
Cron to mail backup notification
echo "Backup completed" | mail -s "Backup Notification" testmail.ignore@gmail.com
Wild Card DNS
For the DNS, edit the DNS zone file and add the following: Code: * IN A x.x.x.x (where [...]
OpenDNS error
change etc/named.conf from: options { directory "/var"; auth-nxdomain no; pid-file "/var/run/named/named.pid"; to this: options { directory "/var"; auth-nxdomain [...]
mysql showing wrong version on cpanel
edit /home/username/.cpanel-datastore/_usr_sbin_mysqld_--version if you have multiple accounts with problem find ./*/.cpanel-datastore/ | grep _usr_sbin_mysqld_--version | awk '{system ("rm [...]
Ssh not restarting in vps
Please do this commands in shell rm -rf /dev/null mknod /dev/null c 1 3 /etc/rc.d/init.d/sshd restart
Kernel compilation
Go to the /usr/src directory Unpack the source code with tar -xvzf linux-2.x.x.tag.gz. Move to the /usr/src/linux sub-directory. [...]
Unable to load iptables module (ipt_state), aborting
Starting APF:Unable to load iptables module (ipt_state), aborting. Just enable the no kernel option in /etc/apf/conf.apf It should [...]
Script to change permission of files
find /home/*/public_html/ -type d -perm 777 -exec chmod 755 {} ;>/dev/null 2>&1 find /home/*/public_html/ -type f -perm 777 -exec chmod [...]
Temp partition remount
umount /tmp umount /var/tmp dd if=/dev/zero of=/usr/tmpDSK bs=1024 count=512000 mkfs.ext3 /usr/tmpDSK press 'y' to continue mount -o loop,rw,noexec,nosuid [...]
CDP Authentication error
/etc/buagent/agent_config # whether control panel user authentication is enabled (default: no) UserAuthEnabled yes
Script to change blackhole to fail for all accounts
#! /bin/bash grep -rl ':blackhole:' /etc/valiases/ >> blackhole_files for i in `cat blackhole_files` do grep -v ':blackhole:' $i [...]
Password Protect a Directory
1. Create a .htaccess file AuthName "Secure Area" AuthType Basic AuthUserFile /path/to/your/directory/.htpasswd require valid-user 2. Create a .htpasswd [...]
Install ASP
How To: Install ASP (Apache::ASP) on CPanel Login to your server via SSH as root. (If you disabled [...]
Invalid command .BytesLog., perhaps mis-spelled or defined by a module not included in the server configuration
The problem with this kind of symptom is most likely due to the cause that the mod_belimited.so, mod_log_bytes.so, [...]
php5 in litespeed
AddHandler php5-script htm html php
php5 in apache
Add the follwing in .htaccessfile AddHandler application/x-httpd-php5 .php
cpanel backup script
cat /etc/trueuserdomains | awk -F: '{print $2}' > /root/users for i in `cat /root/users`;do /scripts/pkgacct $i; scp /home/cpmove-$i.tar.gz [...]
LiteSpeed with cPanel/WHM
You will get many benefits by replacing Apache with LSWS, web pages get loaded faster, server load is [...]
Script to create multiple accounts
#! /bin/bash make a file (test1) which contains domain names, username and password. then run the script: for [...]
Server Securing
Securing Your Server Below given are some of the steps that can be used to secure your server. [...]
Apache Optimization
MaxClients ————— The number of worker processes is limited by the parameter MaxClients. MaxClients = Total RAM dedicated [...]
HyperVM
Master configuration Run the script from /root -------------------------------------------------------------- #!/bin/sh if ! [ -f /usr/bin/yum ] ; then echo [...]