Enabling nginx caching allows the nginx proxy server to cache certain website dynamic content. The cached data is stored for a short time (usually no more than several seconds). This can help speed up the website load time and reduce server load.
Enabling nginx caching is recommended only for websites with a specific profile (for example, popular blogs or news websites):
Enabling nginx caching can be useless or even harmful for websites with the following profile:
You can enable nginx caching for individual domains or hosting plans.
To enable nginx caching for a hosting plan:
Now, every time you create a new subscription based on this hosting plan, nginx caching will be automatically enabled on that subscription's domains and subdomains. Existing subscriptions based on this hosting plan will not be affected.
To learn how to enable nginx caching for a domain, click here.
You can set the default values for a number of nginx caching settings (for example, cache size, cache timeout, and so on) by editing the panel.ini file. The customized values will be applied to newly created hosting plans, domains, and subdomains, and will not affect those that already exist.
See below for the list of nginx caching settings that you can customize via the panel.ini file.
; path where to store cache
nginxCacheDir = /var/cache/nginx
; default values
nginxCacheEnabled = off
nginxCacheSize = 62914560
nginxCacheTimeout = 5
nginxCacheKey = $scheme$request_method$host$request_uri
nginxCacheCookies = ""
nginxCacheBypassLocations = ""
nginxCacheBypassHeaderNocache = on
nginxCacheBypassHeaderAuth = on
nginxCacheBypassGetNocache = on
nginxCacheUseStale5xx = on
nginxCacheUseStale4xx = off
nginxCacheUseStaleUpdating = on
; maximum values
nginxCacheSizeMax = 1099511627776
nginxCacheTimeoutMax = 3153600000