You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/cloudlinuxos/shared-pro/README.md
+261-1Lines changed: 261 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1886,7 +1886,267 @@ MAx Cache will not work in AccelerateWP when:
1886
1886
* The site is a WordPress Multisite (the MAx Cache .htaccess block is skipped).
1887
1887
* The site language is Korean (ko_KR) (the MAx Cache .htaccess block is skipped).
1888
1888
* Using the AccelerateWP PHP filter to replace dots with underscores.
1889
-
* Using the AccelerateWP PHP filter forces the full path to cache files instead of using DOCUMENT_ROOT.
1889
+
* Using the AccelerateWP PHP filter forces the full path to cache files instead of using DOCUMENT_ROOT.
1890
+
1891
+
## MAx Cache for NGINX
1892
+
1893
+
### Overview
1894
+
1895
+
MAx Cache for NGINX (`ea-nginx-maxcache`) is the NGINX counterpart of the [Apache MAx Cache module](/cloudlinuxos/shared-pro/#max-cache-documentation) . It serves pre-generated static HTML cache files produced by AccelerateWP directly from disk, bypassing PHP on cache hits. The module shares the same `libmaxcache` core library as the Apache module for device detection, WebP support, cookie handling, and query-string normalization.
1896
+
1897
+
:::note MAx Cache for NGINX is currently supported on cPanel control panels only. :::
The `maxcache-configd` daemon is enabled automatically on package install:
1922
+
1923
+
```
1924
+
systemctl status maxcache-configd
1925
+
journalctl -u maxcache-configd -f
1926
+
```
1927
+
1928
+
### Supported modes
1929
+
1930
+
#### Default: automatic via maxcache-configd daemon
1931
+
1932
+
In the default mode, the `maxcache-configd` daemon reads AccelerateWP `.htaccess` directives and writes parsed per-domain configuration to shared memory (`/dev/shm/maxcache_config`). The NGINX module reads this shared memory on each request. No manual NGINX configuration is needed per domain.
1933
+
1934
+
The `maxcache_dynamic` directive (enabled by default) and `maxcache_shm_path` are the only `http`-level directives required. The `ea-nginx-maxcache` package configures them automatically.
1935
+
1936
+
#### ea-nginx reverse proxy (proxy\_pass)
1937
+
1938
+
NGINX sits in front of Apache. On a cache hit, the module serves the file directly and Apache is never contacted. On a miss, the request is proxied to Apache as usual.
1939
+
1940
+
#### ea-nginx standalone (fastcgi\_pass)
1941
+
1942
+
NGINX handles all traffic without Apache. PHP requests go to PHP-FPM via `fastcgi_pass`. On a cache hit, the module serves the file directly and PHP-FPM is never contacted.
1943
+
1944
+
#### Manual NGINX configuration
1945
+
1946
+
For domains not managed by AccelerateWP, static directives (`maxcache on`, `maxcache_path`, exclusions, etc.) can be set directly in `nginx.conf` or included config files. These also serve as fallbacks when the daemon does not have configuration for a domain.
1947
+
1948
+
### Activation
1949
+
1950
+
Use the `cloudlinux-awp-admin` tool to enable MAx Cache:
The AccelerateWP plugin must be installed and up-to-date on the target WordPress sites.
1962
+
:::
1963
+
1964
+
### Known issues
1965
+
1966
+
#### mod\_ruid2 and NGINX standalone mode
1967
+
1968
+
:::warning
1969
+
When using NGINX in **standalone mode** (without Apache), `mod_ruid2` can cause permission issues.
1970
+
:::
1971
+
1972
+
`mod_ruid2` changes file ownership to match the site owner's UID/GID. Cache files may end up with restrictive permissions (e.g., `0700`) that the NGINX `nobody` user cannot read, resulting in cache misses.
1973
+
1974
+
**Symptoms:**
1975
+
1976
+
* NGINX always passes requests to the backend despite MaxCache being enabled.
3. Or switch to **ea-nginx reverse proxy (proxy\_pass) mode** (recommended when `mod_ruid2` is active).
1995
+
1996
+
### Configuration directives
1997
+
1998
+
All directives below map directly to their [Apache MAx Cache counterparts](https://docs.cloudlinux.com/cloudlinuxos/shared-pro/#max-cache-documentation) . In most deployments with `maxcache_dynamic on` (the default), these are managed automatically by the daemon.
0 commit comments