Welcome! Log In Create A New Profile

Advanced

Problem with new Passenger Module and rewrite rules

April 28, 2009 01:30PM
Hi,

I've got a problem, I'm trying to get the new nginx passenger module (phusion.nl) to work with some rewrite rules.
The cache files for a multisite app (mephisto) are located in /cache/domain.tld/

I want to rewrite the following:
/ -> /cache/example.com/index.html
/about/ -> /cache/example.com/about.html
/images/fu.jpg -> /cache/example.com/images/fu.jpg

my rules are basically as follows (inside the server block):

[code]
rewrite ^/$ /cache/$host/index.html break;
rewrite ^([^.]+?)/?$ /cache/$host$1.html break;

location ~ ^/(images|javascripts|stylesheets)/ {
if (!-e $request_filename) {
rewrite ^/(images|javascripts|stylesheets)/(.+)$ /cache/$host/$1/$2 last;
}
}
[/code]

This works fine if the cached files exist, however, if they don't in which case the passenger module should forward the request
to the actual app, it doesn't.
The app doesn't get any request.... and I don't know why...

Can anyone tell me why this happens?
Subject Author Posted

Problem with new Passenger Module and rewrite rules

solars April 28, 2009 01:30PM

Re: Problem with new Passenger Module and rewrite rules

solars May 02, 2009 08:37AM

Re: Problem with new Passenger Module and rewrite rules

Jan Faber August 18, 2009 05:25AM

Re: Problem with new Passenger Module and rewrite rules

Hongli Lai August 18, 2009 06:23AM

Re: Problem with new Passenger Module and rewrite rules

Jan Faber August 18, 2009 06:42AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 303
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready