Add Comment

You are not currently logged in. If you do not have a user account then please consider creating one and logging in before you post your comment. This will allow you to track replies to your comment, and take part in the site much more freely.

To add your comment, fill in all the boxes below and then preview it to make sure you're happy with the way that it looks.

This is the comment you were replying to, attached to the article Running Ruby applications with Mongrel and Apache2:


Re: Running Ruby applications with Mongrel and Apache2
Posted by shoof (70.90.xx.xx) on Fri 2 Feb 2007 at 15:02
It is better for performance to let Apache handle the static requests (images, stylesheets etc..)

This can be done easily with mod_rewrite.

RewriteEngine On

RewriteRule ^/$ /index.html [QSA]
RewriteRule ^([^.]+)$ $1.html [QSA]

RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
RewriteRule .* http://localhost:3000%{REQUEST_URI} [P,QSA]


This checks if the file is static and lets apache handle it, everything else goes to mongrel.

Username:Anonymous
Title:
Your Comment:

Posting Format:

 

Inappropriate comments will be removed.

Some help on entry formatting is available

User Login

Username:

Password:

[ Advanced Login ]

Register Account

Quick Site Search