Awstats outside cpanel
Download the Awstats.zip from http://totalchoicehosting.com/downloads/Awstats_Access.zip and unzip Go to the stats subdirectory and edit the config.php file Upload [...]
Freebsd – google apps mail problem
vi /etc/mail/virtusertable @domainname.com %1@google.smtp then make make restart /etc/rc.d/sendmail restart
FFMPEG Yum installation
1. Install RPMForge: http://packages.sw.be/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.i386.rpm 2. That'll give you access to a repo to install ffmpeg 3. Then yum [...]
How to find PHP injection through logs
URL Injection -- attempt to inject / load files onto the server via PHP/CGI vulnerabilities Sample log report [...]
Suphp
Reference from https://support.apthost.com/ What is suPHP is: On most Apache servers, PHP runs as an Apache module. This [...]
Invalid tgz file : Cpanel PEAR Installer problem
The problem is caused by differences in the way PHP 5.2.x parses code, and can be fixed by [...]
Drop DDOS attack
1. Find.. to which IP address in the server is targeted by the ddos attack netstat -plan | [...]
Script to find how many mails sent from an account
grep xxx@xxx.com /var/log/exim_mainlog | grep "<=" | awk {'print $3'} | wc -l
Google apps
Create account for your domain in google Apps **************************************** First of all, create an account for your domain [...]
About VPS
1.1. What is VPS? A virtual private server or virtual dedicated server (VPS or VDS)is a server run [...]
Iframe removal script
find /home/zzz/public_html/ ( -name "*.php" -o -name "*.html" -o -iname "*.htm" ) -exec grep -l "xxx" {} ; [...]
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 [...]