Complete Guide to the ea-nginx Script in cPanel & WHM

This article explains the ea-nginx script used to manage NGINX configurations in EasyApache 4. It covers how to run the script, configure or remove users, manage user and system caching, clear cache files, and use additional options such as reload, help, and hint.

ea-nginx scriptNGINX managementEasyApache 4

~4 min read • Updated Feb 22, 2026

1. Overview


The /usr/local/cpanel/scripts/ea-nginx script is the primary tool for managing NGINX® configurations in EasyApache 4. It configures or removes NGINX users, reloads user configurations, and manages cache settings.


Important: This script only works with the EasyApache 4 implementation of NGINX.


The script creates each user’s configuration file in the following location:

/etc/nginx/conf.d/users/username.conf



2. Run the Script


To run the script, execute the following command as the root user:

/usr/local/cpanel/scripts/ea-nginx [options]

The available options vary depending on the action you perform.




3. Configure NGINX Users


To configure a user for NGINX:

/usr/local/cpanel/scripts/ea-nginx config user

You may use the following options:

Option Description Example
user Configure a specific cPanel user. This also clears the user’s cache. config user
--all Configure all cPanel accounts. Builds configurations in parallel. config --all
--no-reload Do not reload NGINX immediately. config user --no-reload
--serial Build configurations serially (only with --all). config --all --serial
--global Rebuild only global NGINX configurations. config --global



4. Remove NGINX Users


To remove a user from NGINX:

/usr/local/cpanel/scripts/ea-nginx remove user

Options are similar to the config command.




5. Configure User NGINX Cache


To manage a user’s NGINX cache:

/usr/local/cpanel/scripts/ea-nginx cache user [options]

Option Description Example
--reset Reset the user’s cache settings to system defaults. --reset
--enabled=1/0 Enable or disable the user’s cache. Also clears the user’s cache. --enabled=1
--no-rebuild Do not rebuild or reload NGINX immediately. --no-rebuild



6. Configure System NGINX Cache


To configure system-wide caching:

/usr/local/cpanel/scripts/ea-nginx cache --system [options]

Option Description Example
--reset Reset system cache settings to defaults. --reset
--enabled=1/0 Enable or disable system caching. --enabled=1
--no-rebuild Do not rebuild or reload NGINX immediately. --no-rebuild



7. Clear NGINX Cache


To clear cache for specific users:

/usr/local/cpanel/scripts/ea-nginx clear_cache user1 user2

To clear cache for all users:

/usr/local/cpanel/scripts/ea-nginx clear_cache --all



8. Additional Options


Option Description Example
help Display full help information. help reload
hint Display abbreviated help information. hint reload
reload Reload NGINX configuration. Also clears the user’s cache. reload



Conclusion


The ea-nginx script is an essential tool for managing NGINX within cPanel & WHM. It provides full control over user configurations, caching behavior, and global NGINX settings, making it a powerful utility for administrators.


Written & researched by Dr. Shahin Siami