You don't need to. If there's a corresponding .html file, then Phusion
Passenger will serve it automatically without special rewrite rules.
If there's a corresponding file with the same name as the URI, then
that will be served automatically. Everything else is automatically
passed to the application.
--
Phusion | The Computer Science Company
Web: http://www.phusion.nl/
E-mail: in...@phusion.nl
Chamber of commerce no: 08173483 (The Netherlands)
No, it checks for $DOCUMENT_ROOT/about.html, and if that doesn't
exist, $DOCUMENT_ROOT/about. If that file doesn't exist either then it
will be passed to the Rails app.
So page caching works as expected. Static assets serving works as
expected. Only if your page cache files do not follow the standard
file naming will you have to use rewrite rules. Everything else is
take care of automatically.
--
Phusion | The Computer Science Company
Web: http://www.phusion.nl/
E-mail: in...@phusion.nl
Try removing the "break". I think "break" means "let Nginx's default
handler handle this URI instead of whatever third party module might
be active".
--
Phusion | The Computer Science Company
Web: http://www.phusion.nl/
E-mail: in...@phusion.nl
Static assets and page cache files. If the URI maps to a filename
which exists, then that file is automatically served without hitting
the Rails app. If there's a corresponding page file .html file, then
that file is automatically served without hitting the Rails app. All
this happens automatically without the need for rewrite rules.
So the location block is not necessary.
--
Phusion | The Computer Science Company
Web: http://www.phusion.nl/
E-mail: in...@phusion.nl