Use of www in website addresses

Tim Berners-Lee is the creator of the "World Wide Web" and the www prefix used in so many website addresses was his "fault" 🙂 It made sense at the time to have a different prefix for domains for different services such as ftp, email, websites and more. However, websites came to use both the www and non-www prefix for accessing them (eg www.example.com and example.com) and the www part has therefore become somewhat redundant.

This article looks at why I use the www version of the domain name as the primary domain name for my websites, and redirect traffic from the non-www version to the www version.

Compressing files on Apache with mod_deflate

It’s possible with the Apache web server to compress files that are sent to the browser so less bandwidth is consumed and the load time should generally be faster. The module in Apache 2.0 and up is called mod_deflate.

Apache – Permission denied: Failed to acquire SSL session cache lock

I’ve set up a CentOS 5 Apache web server for a customer where we run the web server as user different from the default user "apache" (often "nobody" is used as well). The application runs through SSL using mod_ssl, and when accessing SSL secured pages errors like these would appear in the error log:

"[Wed Nov 14 11:16:49 2007] [warn] (13)Permission denied: Failed to acquire SSL session cache lock
[Wed Nov 14 11:16:49 2007] [warn] (13)Permission denied: Failed to release SSL session cache lock"

Overriding the AWStats LogFile Configuration Option

I run AWStats on one of my servers and it copies files over from some of the other servers I manage every 15 minutes and processes them. However, I had a server issue yesterday with the machine that AWStats runs on, and it meant the auto process which copies the files over and runs AWStats stopped running for about 12 hours. The end result was some lost information and needing to regenerate stats for the month to date. I needed to override the AWStats LogFile configuration directive on the command line to be able to do this.

Installing mod_ssl on Apache on CentOS 5

I was moving a customer’s website from its old dedicated web server to a shiny new one, installing CentOS 5 on it with Apache 2.2 and MySQL 5.0. They already had a secure certificate running on the old site, so I copied the certificate files over and the secure server settings into the appropriate configuration file.

Changing Apache log rotation behaviour on CentOS / RHEL

On a default install of CentOS or Red Hat Enterprise Linux, the log rotation script will automatically rotate the Apache log file each day and then reload the httpd service. This post looks at how to prevent this action from occuring automatically, or to change the behaviour to rotate the log files if your naming convention for log files is different from the default.