Created
September 15, 2009 02:24
-
-
Save miyagawa/187070 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
== Ideally == | |
This is how PSGI spec wants web servers to define SCRIPT_NAME and PATH_INFO vars, at least I can tell from Rack and WSGI docs. | |
If the app is hosted on /: | |
URL SCRIPT_NAME PATH_INFO | |
---------------------------------------- | |
/ (empty) / | |
/foo (empty) /foo | |
/foo/bar (empty) /foo/bar | |
If the app is hosted on /foo: | |
URL SCRIPT_NAME PATH_INFO | |
---------------------------------------- | |
/foo /foo (empty) | |
/foo/ /foo / | |
/foo/bar /foo /bar | |
== Apache (mod_cgi) == | |
If the app is hosted on /foo: (foo is a .cgi file) | |
URL SCRIPT_NAME PATH_INFO | |
---------------------------------------- | |
/foo /foo (empty) | |
/foo/ /foo / | |
/foo/bar /foo /bar | |
== Apache (mod_perl) == | |
If the app is hosted on / with | |
<Location /> | |
SetHandler perl-script | |
PerlHandler Foo | |
</Location> | |
URL SCRIPT_NAME PATH_INFO | |
---------------------------------------- | |
/ / (empty) | |
/foo /foo (empty) | |
/foo/bar /foo /bar | |
If the app is hosted on /foo with | |
<Location /foo> | |
SetHandler perl-script | |
PerlHandler Foo | |
</Location> | |
URL SCRIPT_NAME PATH_INFO | |
---------------------------------------- | |
/foo /foo (empty) | |
/foo/ /foo / | |
/foo/bar /foo /bar | |
== Lighttpd (mod_fastcgi) == | |
If the app is hosted on / with | |
( | |
"" => | |
(( | |
"socket" => "/tmp/fcgi.sock", | |
"check-local" => "disable" | |
)) | |
) | |
URL SCRIPT_NAME PATH_INFO | |
---------------------------------------- | |
/ / (empty) | |
/foo /foo (empty) | |
/foo/bar /foo/bar (empty) | |
If the app is hosted on /foo with | |
( | |
"/foo" => | |
(( | |
"socket" => "/tmp/fcgi.sock", | |
"check-local" => "disable" | |
)) | |
) | |
URL SCRIPT_NAME PATH_INFO | |
---------------------------------------- | |
/foo /foo (empty) | |
/foo/ /foo / | |
/foo/bar /foo /bar | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment