-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathREADME
100 lines (61 loc) · 2.42 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
Introduction
============
mod_scgi is an implementation of the
`Simple Common Gateway Interface <http://python.ca/scgi/protocol.txt>`_
for the `Nginx <http://nginx.net>`_ web server.
Nginx is a fast asynchronous HTTP server.
Installation
============
mod_scgi has been tested with Nginx 0.5.35.
Download the Nginx sources from http://nginx.net/ and unpack it.
The sources of mod_scgi can be downloaded from a
`Mercurial <http://www.selenic.com/mercurial/wiki/>`_ repository:
http://hg.mperillo.ath.cx/nginx/mod_scgi/
At the moment there is no stable release, so you need to download the
latest revision (*tip*) or the latest *tag*.
The *tip* can be downloaded via the Mercurial web interface:
http://hg.mperillo.ath.cx/nginx/mod_scgi/archive/tip.tar.gz
or cloning the repository: ::
hg clone http://hg.mperillo.ath.cx/nginx/mod_scgi/
The latest *tag* can be found from:
http://hg.mperillo.ath.cx/nginx/mod_scgi/tags
To build Nginx, change to the directory which contains the Nginx
sources, and run the configuration script making sure to add the path
to the mod_scgi sources using the --add-module option.
It is recommended to enable debugging. ::
$ ./configure --add-module=/path/to/mod_scgi/ --with-debug
Nginx will use as default prefix path the directory
`/usr/local/nginx`.
Now you can build and install the software: ::
$ make
and as root: ::
$ make install
Notes
=====
This module is still under development.
The module is mainly an adaptation of the existing
`ngx_http_fastcgi_module`, with some code (the HTTP status line and
headers parsing) from the `ngx_http_proxy_module`.
In the current version `SCRIPT_NAME` and `PATH_INFO` are not defined.
The current implementation also only supports SCGI response that
conforms to HTTP 1.0; this means that the response must start with an
HTTP 1.x status line (like `HTTP 1.0 200 OK`) and not by using the
`Status` header.
BUGS
====
This implementation is not fully conform to the SCGI protocol.
The SCGI specification states: ::
Duplicate names are not allowed in the headers
however Nginx does not combines multiple headers.
Example
=======
Here is a sample configuration: ::
location /scgi {
scgi_pass 127.0.0.1:4000;
include conf/scgi_vars;
scgi_var SCRIPT_NAME /scgi;
scgi_var PATH_INFO /xxx;
}
note the inclusion of the `conf/scgi_vars` file.
This file must be copied to the nginx `$prefix/conf` directory by
hand.