mirror of
https://github.com/caddyserver/caddy.git
synced 2025-07-31 15:08:42 -04:00
Add explanation for proxy transport configs
parent
b8c8418390
commit
8b47cc239d
@ -1404,25 +1404,50 @@ Transport modules:
|
||||
"dial_timeout": "5s",
|
||||
"fallback_delay": "250ms",
|
||||
"response_header_timeout": "5s",
|
||||
"expect_continue_timeout": "5s",
|
||||
"max_response_header_size": 1024,
|
||||
"expect_continue_timeout": "5s",
|
||||
"read_buffer_size": 4096,
|
||||
"write_buffer_size": 4096,
|
||||
}
|
||||
```
|
||||
|
||||
- `tls`: Configures TLS between the proxy and the backend.
|
||||
- `tls.root_ca_pool`: A list of base64-encoded DER certificates to use as the root CA pool; these are the CA certificates that will be accepted by the proxy when connecting to a backend with TLS.
|
||||
- `tls.client_certificate_file`: Path to a PEM certificate file to present to the backend. For use with TLS client authentication (mTLS, i.e. for the proxy to authenticate with the backend).
|
||||
- `tls.client_certificate_key_file`: Path to the PEM private key file associated with the client certificate in `client_certificate_file`.
|
||||
- `tls.insecure_skip_verify`: If true, disables certificate verification. This is insecure, dangerous, and cancels the benefits of TLS. Use only for testing/development.
|
||||
- `tls.handshake_timeout`: Maximum time to establish TLS connection with the backend.
|
||||
- `keep_alive`: TCP Keep-Alive configuration between the proxy and the backends.
|
||||
- `keep_alive.enabled`: If false, TCP Keep-Alive will be disabled. Each request will establish a new connection. Default is true (Keep-Alive enabled).
|
||||
- `keep_alive.probe_interval`: How often to probe for idleness.
|
||||
- `keep_alive.max_idle_conns`: Maximum number of idle connections to keep alive across any host.
|
||||
- `keep_alive.max_idle_conns_per_host`: Maximum number of idle connections to keep alive for a single host.
|
||||
- `keep_alive.idle_timeout`: How long an idle connection should be kept alive without activity.
|
||||
- `compression`: If false, compression to the backend will be disabled. Default true (enabled).
|
||||
- `max_conns_per_host`: Maximum number of connections to allow per backend from this proxy. If this limit is reached, connections will block until an opening becomes available.
|
||||
- `dial_timeout`: Maximum time allowed to dial connection to a backend.
|
||||
- `fallback_delay`: Duration between dual stack fallback attempts. Not used by default.
|
||||
- `response_header_timeout`: Maximum time to wait for response headers to be downloaded.
|
||||
- `max_response_header_size`: Maximum size to allow for response headers.
|
||||
- `expect_continue_timeout`: Maximum time to allow for HTTP 100 Continue responses.
|
||||
- `read_buffer_size`: Size of the read buffer in bytes.
|
||||
- `write_buffer_size`: Size of the write buffer in bytes.
|
||||
|
||||
|
||||
- **FastCGI**: The FastCGI transport module is often used to proxy requests to PHP backends like php-fpm.
|
||||
|
||||
```json
|
||||
{
|
||||
"protocol": "fastcgi",
|
||||
"root": "{http.vars.root}",
|
||||
"root": "/var/www/mysite",
|
||||
"split_path": ".php",
|
||||
"env": [["key", "value"]]
|
||||
}
|
||||
```
|
||||
|
||||
- `root`: Path to the root of the site, which is necessary when creating the environment variables for the request's FastCGI environment. Default is `{http.vars.root}` or current working directory.
|
||||
- `split_path`: To create the FastCGI environment, the URI path will be split into two parts, with the first part ending with the first occurrence of this substring. The first part will be used as the actual resource (CGI script) name in DOCUMENT_URI, and the second piece will be set to PATH_INFO for the CGI script to use.
|
||||
- `env`: Key-value pairs to add to the FastCGI environment.
|
||||
|
||||
##### http.handlers.subroute
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user