Message-ID: <30563168.485.1711695607066.JavaMail.serveradmin@t01app> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_484_32971496.1711695607062" ------=_Part_484_32971496.1711695607062 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
This article can still be improved by adding a longer term larger soluti= on for multi-site hosting for the error logs and a logging rotation solutio= n if we are not using Ubuntu.
By default Apache just keeps it main log files in /var/log/apache2/ as s=
ingle files,access.log - all incoming requests and respons=
es
error.log - any errors
other_vhosts_acc=
ess.log - access log for VirtualHosts that don't define their own =
logfile
This is fine for casual servers. However, as you get more serious the fo= llowing will happen,
=20To solve this we need to do log managaement focusing on two things,
= =20If you use apt-get to install Apache on Ubuntu log management is already= happening by default. This is done by logrotat= e. Settings can be found in /etc/logrotate.d/apache2 and the defaults a= re,
=20If someone looks up size x please share it here.
The ubuntu logrotate is great but what about distinguishing between diff= erent virtual hosts.
=20There are two approaches I am aware of and I personally only have figure= d out approach 1 where each virtual host has its own set of log files which= I call "Virtual Host Based Logging". Further information is at the Apache2 Log Files documentation.
=20This approach is already outlined as part of my Apache Setu= p article.
=20There does not seem to be a clear winner in this department. Here is wha= t I looked at that appear to be popular via Google searches.
=20logroate - use what Ubuntu uses. Some possible references,
=20http://blog.andre= wbeacock.com/2008/02/how-to-use-logrotate-with-apaches.html - talks abo= ut using logrotate with Tomcat without requiring a restart to rollover log = file.
=20Vlogger - Similar (and intended as a replacement for) =
cronolog or httplog. This looks really easy to use, creates sy=
mlinks and can can hook into a database. On the negative side, the package =
seemed last updated in 2005.
Cronolog - the recommended solution fro=
m the Apache2 Log Files documentation but it was l=
ast updated in 2002. The biggest negative, I could not in 5 minutes and nev=
er bothered to go further on figuring out how to pipe for rollover =
and how to split at the same time. The problem is that during roll=
over, the cronolog actually stops logging for a short time before writing =
to a new file.