Installing the Database for Application Deployment
In this second part of a multi-part article series, you'll learn how to install various parts of an application in preparation for deploying it online. This article is excerpted from chapter 12 of the book Practical Rails Projects, written by Eldon Alameda (Apress; ISBN: 1590597818).
Installing the Database for Application Deployment - Log File Configuration (Page 3 of 4 )
LightTPD maintains an access log, an error log, and a PID file, which all tell you something about the serverís status. Most system and application logs can be found in the/var/logdirectory, so a good place to keep the access and error logs is/var/log/lighttpd/. For LightTPD to be able to write to these directories, you must first create the directories, and then change the access rights, as follows:
The access log is where LightTPD keeps a log of all requests that have been made to the server. Among other things, the access log is useful for generating usage reports with, for example, AWStats (http://awstats.sourceforge.net/) and Webalizer (http://www.mrunix.net/webalizer/). You tell LightTPD where to write the access log data with theaccesslog.filenamesetting in the configuration file (Listing 12-1). A typical entry in the access log might look like this:
The LightTPD error log is specified with theserver.errorlogsetting in the configuration file. The following are typical entries in this log:
2006-06-06 09:57:50: (log.c.133) server stopped 2006-06-06 09:58:19: (log.c.75) server started
The location of the PID file is specified with theserver.pid-filesetting in the configuration file. The PID file is created by LightTPD at startup, and it contains the process ID of LightTPD. The file should be located in the/var/rundirectory, along with PID files of other processes.