This commit is contained in:
Mateusz Gruszczyński committed 2026-11-28 00:46:49 +01:00
1 parent 51631810e1
commit e6176cfce3
28 files changed
+959 -506

No files matched your search

+8
View File
@@ -112,6 +112,14 @@ curl -Ik https://n.linuxiarz.pl/nagios/.htaccess
Expect redirects for `/` and `/nagios`, a Basic Auth challenge without credentials, a PHP/static page for `/nagios/`, FastCGI output (not CGI source code) for the CGI URL, and `403` for dotfiles (a Basic Auth challenge may happen first). A `502` suggests a missing backend/socket or bad socket permissions; a `403` can also mean the script is inaccessible/non-executable, and `404` can mean a wrong rewrite or document root. The exact Nagios page may require additional stylesheets/aliases or Nagios-specific CGI environment and permissions. Test these against a real installed Nagios, not only a mock FastCGI server.
## Connection handling
Each FastCGI request uses one new connection to the configured endpoint (no `FCGI_KEEP_CONN` pooling). A PHP-FPM worker serves one connection at a time, so keeping idle connections open would pin workers that other requests need.
- TCP endpoints are opened with `TCP_NODELAY`; the request records (`BEGIN_REQUEST`, `PARAMS`, `STDIN`) are written through a 16 KiB buffer, so a request without a body is sent in a single write. With a request body, the parameters are sent first and the body follows as it arrives from the client.
- Responses are read through a 32 KiB buffer. `STDOUT` records that have already arrived are merged into one body chunk of up to 64 KiB; RustProxy never waits for more output to fill a chunk, so `flush()` in the application still reaches the client immediately.
- The connect/request timeouts, concurrency limit, header limit and stderr limit are unchanged.
## Migrating from Nginx / Angie
| Original directive | RustProxy equivalent |