である場合php
、次のようなものになります。
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;
}
}
つまり、公開ファイルをいくつかのディレクトリに分けることがポイントです。passenger
+ nginx
+でこれを行う方法はありsinatra
ますか (正確には)?
UPD基本nginx
/passenger
セットアップ:
server {
server_name example.com;
root /home/yuri/example.com/public;
passenger_enabled on;
}
詳細については、ドキュメントを参照してください。