Archive for January, 2007

Treason Uncloaked

TCP: Treason uncloaked! Peer 203.12.220.221:59131/80 shrinks window
76154906:76154907. Repaired.
TCP: Treason uncloaked! Peer 203.12.220.227:39670/443 shrinks window
280180313:280180314. Repaired.
TCP: Treason uncloaked! Peer 203.12.220.227:39670/443 shrinks window
280180313:280180314. Repaired.
TCP: Treason uncloaked! Peer 203.12.220.227:39670/443 shrinks window
280180313:280180314. Repaired.
TCP: Treason uncloaked! Peer 203.12.220.237:53759/80 shrinks window
283676616:283676617. Repaired.
TCP: Treason uncloaked! Peer 203.12.220.237:36407/80 shrinks window
352393585:352393586. Repaired.
TCP: Treason uncloaked! Peer 203.12.220.237:38616/443 shrinks window
529411143:529411144. Repaired.
TCP: Treason uncloaked! Peer 58.139.248.9:7611/443 shrinks [...]

Wave the Plesk magic wand

If Plesk ever appears to be out of sync with the configuration files, or if there’s a Plesk issue that’s occurring that makes no sense at all, just stand back and wave the Plesk magic wand:
/usr/local/psa/admin/bin/websrvmng -av
Then restart whatever service was acting up, and things should be sorted out.

Remotely rsync over SSH

rsync -avz -e ssh remoteuser@remotehost:/remote/dir /this/dir/

MySQL Baseline Configuration

Need a baseline configuration for MySQL 4.x or 5.x? Look no further:
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
#old_passwords=1
skip-locking
key_buffer = 64M
max_allowed_packet = 16M
table_cache = 2048
sort_buffer_size = 1M
read_buffer_size = 1M
read_rnd_buffer_size = 8M
myisam_sort_buffer_size = 64M
thread_cache_size = 16
query_cache_size = 32M
thread_concurrency = 8
tmp_table_size=64M
back_log = 100
max_connect_errors = 10000
join_buffer_size=1M
[mysql.server]
user=mysql
basedir=/var/lib
[mysqld_safe]
err-log=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
open_files_limit=65536

Make Apache logs mimic IIS

To make Apache write logs similar to IIS, toss this into your Apache configuration:
LogFormat “%{%Y-%m-%d %H:%M:%S}t %h %u %m %U %q %>s %b %T %H %{Host}i
%{User-Agent}i %{Cookie}i %{Referer}i” iis