
The cgi handler executes CGI programs.
This module accepts three parameters:
Parameters | Type | Description |
---|---|---|
Script Alias | String | It defines a kind of execution interpreter. The CGI will be run as a parameter of this script. |
Change to UID | String | Executes each CGI under its owner's user ID. |
Error handler | Boolean | Use CGI output as error message. |
Check file | Boolean | Check file existence to build PATH_INFO. |
Pass request | Boolean | Pass request headers. |
Allow X-Sendfile | Boolean | Use the non-standard X-Sendfile header. |
Note that the X-Sendfile feature also supports X-Accel-Redirect headers transparently. This is to allow the migration of applications supporting it whithout having to make major code rewrites.
The Check file flag affects how PATH_INFO is generated. You should disable this when you have an application that is running the whole virtual server tree, as it is a common source of problems. You can look at a practical example about PATH_INFO in the File & Send handler documentation.
This is a pretty common example. It defines a directory called cgi which points to a path out of the Sever root directory where the CGI programs are located.