NGINX Settings

Adjust how Nginx handles website requests, connections and caching.

Where to find it: Sign in as root, open Server > Configuration, then choose NGINX Settings.

Available to: Root only.

Before you start

NGINX Settings can affect server-wide or multi-account behavior. Review the current state, expected service impact, and rollback path before applying a change.

How to use it

  1. Find the connection, request or performance setting you need.
  2. Review its supported values and the server's available resources.
  3. Save, or use Save & Apply to apply it, then check a hosted website.

Available settings

These are the settings offered by the current SHM page. Defaults describe the baseline for an unset value; your saved configuration may differ. Review the effect and capacity of the server before changing a value.

Workers & Events

Controls how many Nginx workers run and how many connections they can handle.

SettingValues and baselinePurpose and when to change it
Worker processes (worker_processes)
worker_processes
int_or_auto; range 1–256
Baseline: 4
Number of worker processes. You may set "auto" to use the number of available CPU cores.
Use "auto" for most servers. If you set a number, start with the number of CPU cores.
Worker connections (worker_connections)
worker_connections
int; range 256–131072
Baseline: 65535
Maximum number of simultaneous connections per worker process.
Default 65535 keeps the SHM high-traffic template aligned with the open-file limits. Lower this on small servers if memory pressure appears.
Worker open-file limit (worker_rlimit_nofile)
worker_rlimit_nofile
int; range 1024–1048576
Baseline: 65535
Per-worker file descriptor ceiling applied by the Nginx master before workers are spawned.
Keep at least as high as worker_connections. Raising this also requires the Nginx systemd LimitNOFILE to be high enough.
Service open-file limit (systemd LimitNOFILE)
service_nofile_limit
int; range 1024–1048576
Baseline: 65535
Open-file limit written to the nginx systemd drop-in used by SHM apply/install flows.
Reloading Nginx is not enough for this value; SHM restarts nginx after a root config apply so the master process inherits the new limit.
Multi accept (multi_accept)
multi_accept
on / off
Baseline: on
When enabled, a worker accepts as many connections as possible at a time.
Keep on for high-load servers. If you see latency spikes, you may test off.

Client Limits & Timeouts

Controls request size limits and client-side timeouts.

SettingValues and baselinePurpose and when to change it
Max upload size (client_max_body_size)
client_max_body_size
Size, for example 128k or 64m
Baseline: 10g
Maximum allowed size of the client request body (uploads).
Reduce if you do not need large uploads to limit abuse. Increase only when required by applications.
Client body timeout (client_body_timeout)
client_body_timeout
Time with a unit, for example 30s or 5m
Baseline: 300s
Time limit for reading the request body from the client.
Keep conservative. Increase only for slow clients or very large uploads.
Client header timeout (client_header_timeout)
client_header_timeout
Time with a unit, for example 30s or 5m
Baseline: 10s
Time limit for reading the request header from the client.
Keep low to reduce slowloris-style abuse. Increase only if needed.
Keepalive timeout (keepalive_timeout)
keepalive_timeout
Time with a unit, for example 30s or 5m
Baseline: 30s
How long to keep an idle keepalive connection open.
Keep moderate. Reduce if you have many idle connections; increase only for client reuse patterns.

Upstream Timeouts

Controls timeouts for proxy and FastCGI upstream connections (values in seconds).

SettingValues and baselinePurpose and when to change it
Proxy connect timeout (proxy_connect_timeout)
proxy_connect_timeout
int; range 1–3600
Baseline: 300
Timeout for establishing a connection to the upstream server.
Keep aligned with upstream availability and your failover expectations.
Proxy read timeout (proxy_read_timeout)
proxy_read_timeout
int; range 1–86400
Baseline: 300
Timeout for reading a response from the upstream server.
Increase only for long-running upstream responses (e.g., exports).
Proxy send timeout (proxy_send_timeout)
proxy_send_timeout
int; range 1–86400
Baseline: 300
Timeout for transmitting a request to the upstream server.
Keep aligned with proxy_read_timeout and upstream behavior.
FastCGI read timeout (fastcgi_read_timeout)
fastcgi_read_timeout
int; range 1–86400
Baseline: 300
Timeout for reading a response from a FastCGI server (PHP-FPM).
Increase only if your PHP scripts legitimately run longer and you expect clients to wait.
Send timeout (send_timeout)
send_timeout
int; range 1–86400
Baseline: 300
Timeout for transmitting a response to the client.
Keep conservative. Increase only for slow client networks and large responses.

Compression (Gzip)

Controls gzip compression for responses.

SettingValues and baselinePurpose and when to change it
Enable gzip (gzip)
gzip
on / off
Baseline: on
Enables gzip compression for eligible responses.
Keep on for better bandwidth usage and faster transfers.
Gzip compression level (gzip_comp_level)
gzip_comp_level
int; range 1–9
Baseline: 5
Compression level: higher values compress more but use more CPU.
Use 4–6 for most servers. Avoid 9 unless you have spare CPU and need maximum compression.

Logging & Privacy

Controls logging verbosity and information exposure.

SettingValues and baselinePurpose and when to change it
Error log level (error_log)
error_log_level
debug, info, notice, warn, error, crit, alert, emerg
Baseline: warn
Controls how verbose error logging is.
Use warn for production. Use info/debug only when troubleshooting.
Expose server version (server_tokens)
server_tokens
on / off
Baseline: off
Controls whether Nginx exposes version details in error pages and headers.
Keep off to reduce information leakage.

Save, apply, and shared limits

Save stores the configuration; Save & Apply also updates the running service after validation. Changes to the service open-file limit require a restart so the Nginx master inherits the new value. A high worker connection limit does not create extra RAM or CPU capacity.

The same page includes Nginx Server Cache. Use its separate Save & Apply control for cache defaults and Account Defaults for automatic activation on new accounts. HTTP Guard opens the shared request-protection policy.

Theme color