Archive for August, 2007

Disable Cache in Squid 2.5

Add/modify squid.conf :
#no local caching
maximum_object_size 0 KB
minimum_object_size 0 KB
# specify uncachable requests
acl all src 0.0.0.0/0.0.0.0
no_cache deny all

or
# caches nothing based on time
acl Working time 08:00-16:00
no_cache deny Working

# avoid having a cache directory
cache_dir null /tmp
or
cache_dir null /null

High Anonymous Proxy (squid 2.5) : header_replace User-Agent

UPDATED
We can’t see the latest yahoo pages if ‘header_replace User-Agent’ set to ‘unknown’ or anonymous User-Agent. To avoid this, change into :
header_replace User-Agent Mozilla/5.0 (en) Gecko/20070515 Firefox/2.0.0.4
or
header_access User-Agent allow all
before
header_access Deny deny all

High Anonymous Proxy (squid 2.5)

UPDATED
I manage squid 2.5 to become high anonymous proxy.
# cd /usr/local/etc/squid
# vi squid.conf
Change this in #Miscellanous
forwarded_for off
[client ip won't recognize]
Add this to #Miscellanous
header_access Allow allow all
header_access Authorization allow all
header_access Cache-Control allow all
header_access Content-Encoding allow all
header_access Content-Length allow all
header_access Content-Type allow all
header_acccess Date allow all
header_access Expires allow all
header_access Host allow all
header_access If-Modified-Since allow all
header_access Last-Modified allow [...]

Production Line Built From Legos Builds Lego Cars

an autonomous production line capable of building Lego cars

Failed to stop mysqld services

Running services mysqld stop or /etc/rc.d/init.d/mysqld stop [failed]
First, do this : # ps -ef | grep mysqld
If showing up :
# /usr/libexec/mysqld –defaults-f lib/mysql –user=mysql –pid-file=/var/run/mysqld/mysqld.pid –skip-locking
Look in to /var/run/mysqld to find mysqld.pid
# cd /var/run/mysqld
# ll
If there’s no mysqld.pid inside /var/run/mysqld directory, create mysqld.pid
# touch mysqld.pid
Assign chown to a mysqld.pid file
# chown -R mysql:mysql mysqld.pid
Why do [...]

Another Way to shutdown FTP

Related to FTP ‘connection timed out’ and ‘a command to shutdown proftpd’, (other) easy way to Shut Down FTP is by using a firewall, close ftp ports!.

FTP ‘connection timed out’

Ftp suddenly goes off and got ‘connection timed out’ before even connected
To determine what’s wrong with FTP :

take a look /var/log/messages file for detailed error reports.
the server hostname may not be resolved. In this case you should put the record like “SERVER_IP SERVER_HOSTNAME” into /etc/hosts.
Make sure that inetd/xinetd is running.If inetd/xinetd is not [...]

Important! Backup Part 1 : in Virtuozzo

Backup is an important thing to do before updating or upgrading Plesk (also important if we’re going to update or upgrade CentOS/RHEL). We can restore system to a previous state, if something goes wrong.
There are many ways to do backups. Here is a series of Backups :
I’m starting with Virtuozzo. Virtuozzo backups all system, files [...]