supernovus/SCGI — pull request #3 by softmoth (2014-06-15 20:29:13+00:00)
Title: Describe how to rehome app URI in nginx config

An application may use the DOCUMENT_URI or PATH_INFO param for routing requests internally. Routes typically assume a path is relative to the application, so in our example: "GET /scgi/foo/bar" would be matched with a get('/foo/bar') route selector. The nginx config should strip the location prefix, so the application doesn't have to hard-code its URI-space mount point.

Also, use "location /scgi/" instead of "location /scgi", to enable the rewrite rule to always succeed. If client requests "/scgi", nginx automatically sends a 301 redirect to "/scgi/".