Archive for the 'Server' category

WHM, CPanel logs

cPanel cPanel/WHM Initial Installation Errors: /var/log/cpanel*install* – These log files contain verbose logs of the

Apache, mod evasive

Login to web server via SSH. For Apache 2.0.x, execute the following command:up2date -i httpd-devel

Cron backup

Add this to Cron jobs: mkdir /home/GENERAL/$(date +”%m-%d-%y”)/; cp -r /var/FOLDER_TO_BACKUP/ /home/GENERAL/$(date +”%m-%d-%y”)/

CRON check DHCP every 3 minutes

*/3     * * * * root    /etc/init.d/dhcp3-server start

Simple DHCP

ddns-update-style interim; # Required for dhcp 3.0+ / Red Hat 8.0+ ignore client-updates; subnet 192.168.1.0

Nat Ubuntu

gksu /etc/network/interfaces auto eth0 iface eth0 inet static address 10.8.16.1 netmask 255.255.255.0 broadcast 10.8.16.0 network

MySQL Order By Custom Order

MySQL Order By Custom Order MySQL Order By Field ORDER BY FIELD(day, ‘Monday’, ‘Tuesday’, ‘Wednesday’,

Apache errors on PHP

ini_set(‘display_errors’, 1); ini_set(‘log_errors’, 1); ini_set(‘error_log’, dirname(__FILE__) . ‘/error_log.txt’); –> optional error_reporting(E_ALL);

Mass replace MySQL string

UPDATE `wp_ij8ir4_posts` SET `post_content` = REPLACE(`post_content`,’phpMyAdmin=123123123123′,”)

Htaccess limit page or directory by IP

# prevent viewing of a specific file order allow,deny deny from all order deny,allow deny