Jan 22
Installing Apache on Debian Squeeze
Just doing apt-get install apache2 will give you a working Apache web server, but not one of the optimized variants. As a rule of thumb:
- apache2-mpm-prefork: every request gets its own (memory-separated) process
- apache2-mpm-worker: the multi-threaded Apache2, uses threads instead of processes and is generally faster than -prefork and might use less memory.
As PHP is not thread-safe, the common suggestion is to install Apache with the "prefork" MPM. Differences between Apache MPMs: http://httpd.apache.org/docs/2.0/en/mod/#core. As I don't use php but Perl, I'll go for the mpm-worker.
WIP:
As Apache logs as many other logs on a Linux system may grow large, it is useful to use logrotate. On Debian Squeeze logrotate is installed and active by default. Read the logrotate basics for a bit more about logrotate.
Logrotate in relation to Apache becomes interesting when you analyse your logfiles with awstats. Read here how to rotate logs with logrotate without losing data.