# nginx

> nginx configuration: security mistakes, and a configuration test in a container.

nginx configuration: security mistakes, and a configuration test in a container.

## Checks

| Check                                                       | Stage    | Level         | What it does                                                                                                                                         |
| ----------------------------------------------------------- | -------- | ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
| [`nginx/gixy`](/reference/checks/nginx/gixy/)               | `commit` | `recommended` | Checks every nginx file for mistakes that expose a server: request forgery, path traversal through alias, header injection, and a disclosed version. |
| [`nginx/config-test`](/reference/checks/nginx/config-test/) | `push`   | `recommended` | Runs `nginx -t` on each main file inside the image, with a throwaway certificate and resolved upstream names. Records every file that nginx parsed.  |

## Settings

| Setting                                                         | What it sets                                                  |
| --------------------------------------------------------------- | ------------------------------------------------------------- |
| [`tools.nginx.image`](/reference/gspot-toml/#tools.nginx.image) | The image nginx -t runs in; name the one the deployment uses. |

## Selected when

gspot selects it in a scope with file paths `**/nginx.conf`, `**/nginx/**/*.conf`.

## Rules for coding agents

| Rule file                                                   | Installed when |
| ----------------------------------------------------------- | -------------- |
| `.gspot/configurations/infrastructure/nginx/rules/NGINX.md` | Always         |

## Tools and versions

| Tool    | Version                  |
| ------- | ------------------------ |
| gixy    | `0.2.53`                 |
| docker  | Any, install it yourself |
| openssl | Any, install it yourself |

## Files gspot writes

gspot writes `.gspot/configurations/infrastructure/nginx/gixy.cfg`.
