corgi is a CGI server. [![free of syn](https://img.shields.io/badge/free%20of-syn-hotpink)](https://github.com/fasterthanlime/free-of-syn) corgi listens on port 26744 by default. `/etc/corgi.conf` ``` Server Port 26744 Script Match Regex Script Environment HTTP_HOST ENV_KEY ``` See [corgi.conf](corgi.conf) for the configuration I use with my cgit instance. Scripts are tried in order, looking for one that matches. If none match, the first script is ran. 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 - **`REMOTE_ADDR`** is the `Forwarded-For` header, maybe prefixed with an `X-`, or the client address if that header is not set - **`REQUEST_METHOD`** to the HTTP request method - **`SCRIPT_NAME`** is set to the path specified in the config - **`SERVER_NAME`** is set to the HTTP host header - **`SERVER_PORT`** is the port that corgi is running on - **`SERVER_PROTOCOL`** is the HTTP version string that the request came in on - **`SERVER_SOFTWARE`** is `corgi/1.0` where `1.0` is the current version number 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, except the `CONTENT_LENGTH` envar. [rfc]: https://datatracker.ietf.org/doc/html/rfc3875