Home arrow Ruby-on-Rails arrow Page 4 - 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 - Mime-Type Configuration
(Page 4 of 4 )

The last line in the configuration file (Listing 12-1),include "mimetypes.conf", tells LightTPD to include the mime-type configuration file. This configures LightTPD so that it responds with the correctContent-TypeHTTP header matching the requested file. For example, the web server sends the headerContent-Type: application/pdfwhen a browser requests a PDF file with the extension.pdf.

Save the configuration shown in Listing 12-2 inconfig/mimetypes.conf.

Listing 12-2. Mime-Type Configuration

mimetype.assign         = (
  ".xpi"         =>    "application/x-xpinstall",
  ".rdf"         =>    "application/xml",
  ".xul"         => "application/vnd.mozilla.xul+xml",
  ".pdf"         =>    "application/pdf",
  ".sig"         =>    "application/pgp-signature",
  ".spl"         => "application/futuresplash",
  ".class"       =>    "application/octet-stream",
  ".ps"          => "application/postscript",
  ".torrent"     =>    "application/x-bittorrent",
  ".dvi"         =>    "application/x-dvi",
  ".gz"          =>    "application/x-gzip",
  ".pac"         =>    "application/x-ns-proxy-autoconfig",
  ".swf"         =>    "application/x-shockwave-flash",
  ".tar.gz"      =>    "application/x-tgz",
  ".tgz"         =>    "application/x-tgz",
  ".tar"         =>    "application/x-tar",
  ".zip"         =>    "application/zip",
  ".mp3"         =>    "audio/mpeg",
  ".m3u"         =>    "audio/x-mpegurl",
  ".wma"         =>    "audio/x-ms-wma",
  ".wax"         =>    "audio/x-ms-wax",
  ".ogg"         =>    "audio/x-wav",
  ".wav"         =>    "audio/x-wav",
  ".gif"         =>    "image/gif",
  ".jpg"         =>    "image/jpeg",
  ".jpeg"        =>    "image/jpeg",
  ".png"         =>    "image/png",
  ".xbm"         =>    "image/x-xbitmap",
  ".xpm"         =>    "image/x-xpixmap",
  ".xwd"         =>    "image/x-xwindowdump",
  ".css"         =>    "text/css",
  ".html"        =>    "text/html",
  ".htm"         =>    "text/html",
  ".js"          =>    "text/javascript",
  ".asc"         =>    "text/plain",
  ".c"           =>    "text/plain",
  ".conf"        =>    "text/plain",
  ".text"        =>    "text/plain",
  ".txt"         =>    "text/plain",
  ".dtd"         =>    "text/xml",
  ".xml"         =>    "text/xml",
  ".mpeg"        =>    "video/mpeg",
  ".mpg"         =>    "video/mpeg",
  ".mov"         =>    "video/quicktime",
  ".qt"          =>    "video/quicktime",
  ".avi"         =>    "video/x-msvideo",
  ".asf"         =>    "video/x-ms-asf",
  ".asx"         =>    "video/x-ms-asf",
  ".wmv"         =>    "video/x-ms-wmv"
)
  


Note  You can also use the mime-type listing found in LightTPD’s configuration template (doc/lighttpd.conf).


Please check back next time for the continuation of this article.


DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

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