Change port no. of ftp
vi /etc/pure-ftpd.conf under # Bind 127.0.0.1, 21 Bind *,123
Hotlink prevention
RewriteEngine On RewriteCond %{HTTP_REFERER} !^http://(.+.)?mysite.com/ [NC] RewriteCond %{HTTP_REFERER} !^$ RewriteRule .*.(jpe?g|gif|bmp|png)$ - [F]
Exim : retry time not reached for any host after a long failure period
The issue is because of the corrupted exim db files. Goto /var/spool/exim/db and delete files: retry , retry.lockfile [...]
FFMPEG installation
DOWNLOAD MODULES wget www3.mplayerhq.hu/MPlayer/releases/codecs/essential-20061022.tar.bz2 wget rubyforge.org/frs/download.php/9225/flvtool2_1.0.5_rc6.tgz wget easynews.dl.sourceforge.net/sourceforge/lame/lame-3.97.tar.gz wget superb-west.dl.sourceforge.net/sourceforge/ffmpeg-php/ffmpeg-php-0.5.1.tbz2 wget downloads.xiph.org/releases/ogg/libogg-1.1.3.tar.gz wget downloads.xiph.org/releases/vorbis/libvorbis-1.1.2.tar.gz EXTRACT MODULES tar zxvf [...]
easy apache – Premature end of script headers error
Error : BEGIN failed--compilation aborted at /var/cpanel/perl/easy/Cpanel/Easy/Utils/BackGround.pm line 12. Compilation failed in require at (eval 18) line 3....propagated [...]
/scripts/upcp hunging or rebuilding rpmdb
Your RPM database may be corrupted. So we need to rebuild the rpm database after deleting all rpm [...]
A Simple Rewite Rule
RewriteEngine on RewriteCond %{HTTP_HOST} ^domainname.com RewriteRule ^(.*)$ http://www.domainname/$1
Bug in Mailman version 2.1.11.cp3
Please do the following commands: cd /usr/local/cpanel/3rdparty/mailman/ chown -R mailman.nobody locks chown -R mailman.nobody lists
changing the smtp port to 26 in plesk
a) add the following to /etc/services smtp-26 26/tcp mail b) Copy /etc/xinetd.d/smtp_psa to /etc/xinetd.d/smtp_psa-26 c) Change the first [...]
Script for restarting apache at load 10
#!/bin/bash loadavg=$(uptime | awk -F "." '{ print $1 }' | awk -F ":" '{ print $5 }') [...]
Preset Cpanel Servers
To preset a server: First login and go to the WHM > Server Configuration > Basic cPanel/WHM Setup: [...]
Important Scripts
========================= Resore pkg cat /root/finallist | awk -F. '{print $1}' > /root/list0 for i in `cat /root/list0`;do /scripts/restorepkg [...]
Ruby on Rails Installation Script
cd /usr/src wget ftp://ftp.ruby-lang.org/pub/ruby/ruby-1.8.5.tar.gz tar -xzvf ruby-1.8.5.tar.gz cd ruby-1.8.5/ ./configure make make test make install cd /usr/src wget http://rubyforge.org/frs/download.php/5207/rubygems-0.8.11.tgz tar [...]
Ruby on Rails Issue
1) First remove all gems Code: gem uninstall rails gem uninstall mongrel gem uninstalled fastthread 2) Now run [...]
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 [...]