A very good way to reduce page load time on your website is to tell your visitors’ browser it can cache some specific files and save a copy on the disk.
This process is done by your web-server which is sending an Expires header and a max-age header during the HTTP response, e.g.:
Date: Tue, 27 Jul 2010 22:31:03 GMT
Server: Apache/2.2.14 (Ubuntu)
Expires: Tue, 03 Aug 2010 22:31:03 GMT
Last-Modified: Fri, 08 May 2009 20:46:23 GMT
Client-Date: Tue, 27 Jul 2010 22:31:02 GMT
Apache2 offers this feature through its mod_expires module. Note that this module is usually disabled by default, meaning your visitors would download all the files over again each time they change the page.
Continue reading “How to set up Expires header with Apache2 on Ubuntu Lucid 10.04”
There are many Apache log analyzers that you can now choose from, but it can be long or confusing to install most of them. I wanted to try and find a simple log analyzer that just does its work using cronjobs. Visitors seems to fit the needs!
We’ll also use ip2host to resolve the IP addresses into domain names.
All of this will be run daily by a cronjob.
Screenshot of a report generated by Visitors
Continue reading “Easy Apache log statistics using Visitors”
scanerrlog offers the possibility to generate a summary or report about Apache errors and sort them depending on how frequent they are.
To install it (for Ubuntu users):
sudo apt-get install scanerrlog
or use Synaptic and search for scanerrlog.
It’s written in Python, and it is very easy to use it. (type ‘man scanerrlog‘ in a terminal to see the manual page)
I tested it with Apache2 log files using the following command:
scanerrlog -f text -o /tmp/log.txt /var/log/apache2/*.log
- -f : format (text, pdf, html, xml)
- -o : output file
- args : log files
Continue reading “scanerrlog – Generate summaries/reports from Apache error logs”
With Apache2, I like to have my websites in different directories, and they cannot interfere with each other. I use Virtual Hosts and suPHP for this.
In Ubuntu repositories, only the 0.6.X version is available, so I packaged the 0.7.1 myself and with the paranoid mode.
Continue reading “[Ubuntu] suPHP 0.7.1 .deb package with Paranoid mode”