If it were php
, it'd be something along the lines:
server {
server_name ...;
root /path/to/root/1;
location / {
try_files $uri @root2;
}
location @root2 {
root /path/to/root/1;
try_files $uri /index.php?$args;
}
location = /index.php {
include fastcgi_params;
fastcgi_pass php;
}
}
In other words, the point is to separate public files into several directories. Is there a way to do this with passenger
+ nginx
+ sinatra
(to be precise)?
UPD Basic nginx
/passenger
setup:
server {
server_name example.com;
root /home/yuri/example.com/public;
passenger_enabled on;
}
For more information see documentation.