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

~2 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

Related Articles

How to Restore Your cPanel Account: A Complete Guide for New System Administrators

This guide explains how new system administrators can restore a cPanel account using WHM, transfer accounts and configurations between servers, and enable diagnostic logging for transfer and restore operations. It covers essential concepts such as WHM vs. cPanel, root access, backup handling, SFTP uploads, transfer methods, and advanced debugging tools.

Continue

آموزش کامل انتقال تمام اکانت‌های cPanel از یک سرور به سرور دیگر

این مقاله نحوه انتقال همه اکانت‌های cPanel، تنظیمات سرویس‌ها، گواهی‌های SSL و IP اصلی سرور را از یک سرور قدیمی (Source) به یک سرور جدید (Target) توضیح می‌دهد. شامل نصب سرور جدید، انتقال تنظیمات، انتقال اکانت‌ها، تغییر IP، تنظیم DNS و نصب مجدد SSL است.

Continue

How to Migrate a WordPress® Installation to a cPanel & WHM Server

This guide explains how to migrate a WordPress installation from a macOS-hosted environment to a cPanel & WHM server. It covers exporting the database, uploading WordPress files, creating and importing a MySQL database, updating URLs, configuring wp-config.php, fixing broken links, and finalizing the migration.

Continue

How to Manually Transfer an Account Between Servers in cPanel & WHM

This article explains how to manually transfer a cPanel account between servers when the account is too large for WHM’s automated transfer tools. It covers creating temporary directories, compressing public_html and log files, securely transferring data with SCP, and restoring the files on the destination server.

Continue

How to Manually Migrate Horde Calendars and Contacts to Roundcube in cPanel & WHM

This article explains how to manually migrate Horde calendars and contacts to Roundcube in cPanel & WHM version 108 through 118. It covers exporting Horde data, placing it in the correct directories, and importing it into Roundcube using built‑in plugins or manual import tools.

Continue

How to Manually Migrate Accounts to cPanel & WHM from Unsupported Control Panels

This article explains how experienced system administrators can manually migrate accounts from unsupported third‑party control panels to cPanel & WHM. It covers pre‑migration steps, installation requirements, file and directory transfers, database restoration, SSL migration, and post‑migration tasks.

Continue