about summary refs log tree commit diff
path: root/README.md
blob: 58db3849129cfc6ef1228e1bc1094681422119df (plain)
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
corgi is a CGI server.

currently, corgi can handle one application.

corgi listens on port 26744 by default.

`/etc/corgi.conf`
```
Script <path-to-cgi-script>
	Environment
		HTTP_HOST <hostname>
		ENV_KEY <some-env-value>
```

Sets the following environmental variables for the CGI script, many following [RFC 3875][rfc]:  
- **`GATEWAY_INTERFACE`** to the fixed value `CGI/1.1`  
- **`PATH_INFO`** to the HTTP path the client requested  
- **`QUERY_STRING`** to the query part of the URI  
- **`REQUEST_METHOD`** to the HTTP request method  

Additionally, corgi will set environment variables for the HTTP request headers.
They will be uppercased and hyphens replaced with underscores.

Any environmental variable may be overridden if it is set in the
configuration file.

[rfc]: https://datatracker.ietf.org/doc/html/rfc3875