Disable modsec for a domain
In apache conf under that user add this: <IfModule mod_security2.c> SecRuleEngine Off </IfModule Restart httpd
Download youtube videos using Firefox for free!!
I know a lot of people who search for online and offline tools (applications) to download youtube videos. [...]
Scheduling Transmission via crontab
I am on a 1Mbps BSNL broadband connection that gives unlimited free downloading from midnight 2AM to morning [...]
Script to generate bind zone file
I have written up a small perl script which can be used to generate a zone file for [...]
High I/O Wait? Don’t always blame it on the hard drive
Recently my friend was complaining about his new OpenVZ main node server taking a lot of i/o resources [...]
Mails redirected /dev/null **bypassed**
Its an issue with spamassasign. Edit the file /etc/mail/spamassassin/local.cf and add the following lines: score FH_DATE_PAST_20XX 0.0 restart [...]
Upgrade phpmyadmin
Go to http://www.phpmyadmin.net/home_page/ and download the latest stable version. Backup the config.inc.php file currently on the server. Use [...]
Fix incorrect time on VPS
In Main Server: # vi /etc/ntp.conf select a server. eg: 0.centos.pool.ntp.org # ntpdate servername eg: ntpdate 0.centos.pool.ntp.org
CIDR Values
CLASS A 255.0.0.0 - /8 255.128.0.0 - /9 255.192.0.0 - /10 255.224.0.0 - /11 255.240.0.0 - /12 255.248.0.0 [...]
Issue : date: cannot set date: Operation not permitted
To fix the issue: # vzctl stop <veid> # vzctl set <veid> --save --capability sys_time:on # vzctl start [...]
Set Timezone on Linux Machine
ln -sf /usr/share/zoneinfo/Asia/Calcutta /etc/localtime Using TZ environment export TZ=Asia/Calcutta date
display cronjob of all users
for user in $(cut -f1 -d: /etc/passwd); do crontab -u $user -l; done
Resize /tmp in cpanel servers
service chkservd stop service httpd stop service mysql stop service postgresql stop lsof | grep /tmp kill the [...]
Plesk Tutorial
I just found a great tutorial of plesk control panel. Here is the link: http://www.eukhost.com/web-hosting/plesk-tutorial.php
Upgrade Python to 3.1
cd /usr/local/src wget http://www.python.org/ftp/python/3.1.1/Python-3.1.1.tar.bz2 tar -jxvf Python-3.1.1.tar.bz2 cd Python-3.1.1 ./configure make make install Now move /usr/bin/python /usr/bin/python.bk then [...]
Drop Sync/DDOS Attack
1. Find.. to which IP address in the server is targeted by the ddos attack netstat -plan | [...]
Script for replacing a string in multiple files
for y in `ls | grep .html`; do sed "s/abc/xyz/g" $y > temp; mv -f temp $y; done
How to Boot second kernel if first fails
Reference : http://www.linux-noob.com/forums/index.php?/topic/2928-grub-single-boot-and-kernel-panic-reboot/ If for example your grub.conf looks like the one i have below. This boots into [...]
Difference between Xen and Open VZ
I just found a great article that discussed about the difference between xen and open vz. Here is [...]
Sender verify defer + host lookup did not complete
Login to WHM >> Main >> Service Configuration >> Exim Configuration Editor . Uncheck the option: Sender Verification [...]
Install Zend Optimizer
cd /usr/local/src check latest zendoptimizer wget http://www.eth0.us/files/ZendOptimizer-3.0.1-linux-glibc21-i386.tar.gz tar -zxf ZendOptimizer-3.0.1-linux-glibc21-i386.tar.gz cd ZendOptimizer-3.0.1-linux-glibc21-i386 ./install If u still receiving "Zend [...]
Round Robin DNS
Round robin DNS is a technique in which load balancing is performed by a DNS server instead of [...]
Disable ping to server
To disable ping echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_all To enable ping echo 0 > /proc/sys/net/ipv4/icmp_echo_ignore_all
Change Mail Server IP
Sometimes your server’s IP address may get black listed by most of RBLs. In such situation a quick [...]
Remote access to mysql database
Step 1 : vi /etc/my.cnf --------------------------------------------- pid-file = /var/run/mysqld/mysqld.pid socket = /var/run/mysqld/mysqld.sock port = 3306 basedir = /usr [...]