This guide maps common Nginx configuration settings to their equivalents in an ASM gateway.
|
Nginx configuration |
Description |
ASM gateway equivalent |
|
allow-backend-server-header |
Allows the backend to return the |
The ASM gateway enables this by default. |
|
allow-snippet-annotations |
Allows using custom snippets in an Ingress annotation to modify the Nginx configuration. |
An ASM gateway does not support this setting. In an ASM gateway, you must modify the gateway configuration by editing the IstioGateway YAML file. |
|
compute-full-forwarded-for |
Appends the remote address to the X-Forwarded-For header instead of replacing it. |
This behavior depends on the Envoy |
|
enable-underscores-inheaders |
Allows underscores in header names. |
This maps to the Envoy |
|
forwarded-for-header |
Specifies the header field used to identify the client's original IP address. |
An ASM gateway does not support a custom header for this purpose. It uses X-Forwarded-For by default. |
|
generate-request-id |
Generates a random X-Request-ID if one is not present in the request. |
This maps to the Envoy |
|
ignore-invalid-headers |
Determines whether to ignore headers with invalid names. A valid header name consists of alphanumeric characters and hyphens (-). It may also include underscores (_). Note
The use of underscores is controlled by the |
Envoy provides a Header Validator. If you do not configure the Header Validator, Envoy uses a default one. Envoy rejects requests with invalid headers with a
|
|
keep-alive-requests |
Sets the maximum number of requests that can be served through a single keepalive connection. After the maximum number is reached, the connection is closed. |
To configure this, see the |
|
log-format-upstream |
Customizes the log format. |
An ASM gateway supports custom log formats. You can configure the format on the Observability settings page in the ASM console. For more information, see Observability settings. |
|
max-worker-connections |
Sets the maximum number of connections that a single worker process can open. |
ASM does not provide a direct equivalent. However, you can use the |
|
proxy-body-size |
Sets the maximum allowed size of the client request body. If the request body exceeds this size, the server returns a 413 error. |
You cannot configure this setting directly. Use chunked transfer encoding for large bodies. |
|
proxy-connect-timeout |
Defines the timeout for establishing a connection with a proxy server. This cannot exceed 75 seconds. |
To configure this, see the |
|
reuse-port |
Creates a separate listening socket for each worker process (using the |
The ASM gateway enables this by default. |
|
server-tokens |
Sends the Nginx server header in responses and displays the Nginx version on error pages. This is disabled by default. |
An ASM gateway sets the server header to |
|
ssl-redirect |
If a server is secured with a TLS certificate, this setting automatically redirects HTTP traffic to HTTPS. |
To configure this, see the |
|
upstream-keepalive-connections |
Sets the maximum number of idle keepalive connections to upstream servers that are preserved in each worker process's cache. |
ASM does not provide a direct equivalent. The DestinationRule provides the |
|
upstream-keepalive-timeout |
Sets a timeout after which the system closes an idle keepalive connection to an upstream server. |
To configure this, see the |
|
use-forwarded-headers |
|
For more information about how Istio handles the X-Forwarded-For header, see Configuring Gateway Network Topology. |
|
worker-cpu-affinity |
Binds worker processes to specific sets of CPUs. |
In a container environment, we do not recommend configuring this option. Using the default setting is sufficient. |
For more information, see Ingress Nginx.