Non-root Web Path

非root web パス(例えば、http://example.com/thisapp/) にFastCGIアプリケーションをインストールする場合、それらのうちの幾つかは、一対のfastcgiパラメータが存在することを期待(およびそれで十分だと分かる)します: PATH_INFOSCRIPT_NAME、Apacheがそれらを設定するのに似た方法で設定されます。

つまり、Apacheでは FastCgiExternalServer /var/www/thisapp -socket /path/to/thisappfcgi.sock のようなものが、NGINXは以下の方法で行うことができます:

location ~ /thisapp(?<path_info>/.*|$) {
  fastcgi_pass    unix:/path/to/thisappfcgi.sock;
  include /etc/nginx/fastcgi_params;

  fastcgi_param   PATH_INFO   $path_info;
  fastcgi_param   SCRIPT_NAME "/thisapp";
}

少なくとも Mercurial, Trac および Zope via FastCGIでは動作することが知られています。

inserted by FC2 system