Page tree
Skip to end of metadata
Go to start of metadata

Overview

Important:

This script only works with the EasyApache 4 implementation of Nginx. Nginx is currently experimental.

The /usr/local/cpanel/scripts/ea-nginx script manages your Nginx configuration. This script will configure or remove an Nginx user, or reload the user configuration. 

This script creates the user's configuration file in the following location:

Note:

In the following example, username represents the username.

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

Run the script

To use this script, run the following command as the root user:

/usr/local/cpanel/scripts/ea-nginx argument option

Options

Use the following options with this script:

Note:

In the following table, user represents the username.

OptionsDescriptionExample

config user [--no-reload]

Configure either one or all users for Nginx.

Notes:

  • You can also use the --all option instead of user. This option will regenerate the user config file for all users.
  • Only pass the --no-reload option if you do not want to reload the Nginx configuration immediately.

config exampleuser --no-reload

config --all --no-reload

reload

Reload your Nginx configuration.

Note:

You must pass this argument if you passed the --no-reload option.

reload

remove user [--no-reload]

Remove a user from your Nginx configuration.

Note:

Only pass the --no-reload option if you do not want to reload the Nginx configuration immediately.

remove exampleuser --no-reload

help [argument]

Display the script's help information.

Note:

The argument is optional. If you specify an argument, only that argument's help information will display.

help reload

hint [argument]

Display the abbreviated help information.

Note:

The argument is optional. If you specify an argument, only that argument's hint information will display.

hint reload

Additional documentation

There is no content with the specified labels

There is no content with the specified labels