Home arrow Ruby-on-Rails arrow Page 3 - Installing the Database for Application Deployment
RUBY-ON-RAILS

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).

Author Info:
By: Apress Publishing
Rating: 5 stars5 stars5 stars5 stars5 stars / 2
August 06, 2010
TABLE OF CONTENTS:
  1. · Installing the Database for Application Deployment
  2. · Module Configuration
  3. · Log File Configuration
  4. · Mime-Type Configuration

print this article
SEARCH DEVARTICLES

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:

$ sudo mkdir /var/log/lighttpd
$ sudo chgrp lighttpd /var/log/lighttpd
$ sudo chmod g+rw /var/log/lighttpd

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:

--------------------------------------------127.0.0.1 www.emporium.com - [13/Aug/2006:07:45:45 +0000] "GET / ...

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.


blog comments powered by Disqus
RUBY-ON-RAILS ARTICLES

- Ruby-on-Rails Faces Second Security Flaw in ...
- Ruby 2.0 Prepped for February 2013 Release
- Why LinkedIn Switched from Ruby on Rails
- Adding Style with Action Pack
- Handling HTML in Templates with Action Pack
- Filters, Controllers and Helpers in Action P...
- Action Pack and Controller Filters
- Action Pack Categories and Events
- Logging Out, Events and Templates with Actio...
- Action Pack Sessions and Architecture
- More on Action Pack Partial Templates
- Action Pack Partial Templates
- Displaying Error Messages with the Action Pa...
- Action Pack Request Parameters
- Creating an Action Pack Registration Form

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 

Developer Shed Affiliates

 




© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials