From 9a754360894e1792dc70f50e1f870730daf5a793 Mon Sep 17 00:00:00 2001 From: Daniel Roethlisberger Date: Sat, 15 Aug 2009 16:52:26 +0200 Subject: [PATCH 3/3] FastCGI: Serve public files directly Adjust the mod_rewrite rules to serve public files directly through the Apache web server, bypassing Sinatra. Serving static content directly removes the overhead of piping the static files through Sinatra. --- book/Deployment.markdown | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/book/Deployment.markdown b/book/Deployment.markdown index e173bfa..861b672 100644 --- a/book/Deployment.markdown +++ b/book/Deployment.markdown @@ -206,6 +206,8 @@ Steps to deploy via FastCGI: AddHandler fastcgi-script .fcgi Options +FollowSymLinks +ExecCGI + RewriteCond %{DOCUMENT_ROOT}/public%{REQUEST_URI} -f + RewriteRule ^(.*)$ /public/$1 [L] RewriteRule ^(.*)$ dispatch.fcgi [QSA,L] @@ -293,4 +295,4 @@ Steps to deploy: rescue Errno::EADDRINUSE => e #puts "== Someone is already performing on port #{port}!" end - end \ No newline at end of file + end -- 1.6.4