Login to your server via SSH (as root).
ssh root@<ip address> -p 2200 Once logged in successfully, you'll need to change into the /usr/local/src directory.
cd /usr/local/src Now, simply download the plugin using wget.
Now that it's been downloaded, you need to extract the compresssed plugin.
tar xf nginxadmin.tar Change into the publicnginx directory.
cd publicnginx Following documentation from cPanel's Create WHM Plugins, we'll need to create the apps directory. ( KnownHost Servers won't need this step! )
mkdir /var/cpanel/apps && chmod 755 /var/cpanel/apps Run the included executable installer program with the 'install' flag.
./nginxinstaller install If you've never setup a Remote Access Key, you'll see the following error: access key doesn't exist To fix this, you'll need to login to WHM, visit the "Clusters" section, select " Remote Access Key" then select "Generate New Key". It should look like this:
If all goes smoothly, the end result should print something similar to the following:
- ************************************************** **
* Installation Complete *
*run /etc/init.d/httpd restart to start Nginx Admin*
************************************************** ** Restart the webserver daemon.
/etc/init.d/httpd restart
Which should result with output similar to this:- Restarting nginx daemon: nginxRemaining processes: 10207
. Now that it's installed and running properly, you'll need to register the app/plugin via cPanel's register_appconfig:
/usr/local/cpanel/bin/register_appconfig /var/cpanel/apps/nginxcp.conf
* Which should result with output similar to this:
- nginxcp registered
NginxCP (nginx as a reverse *****) is now installed and can be viewed/accessed/configured via WHM. To access the Control Panel for nginx, visit your WHM Panel » Plugins » nginx Admin.[IMG]https://www.knownhost.com/wiki/_media/control-panels/cpanel-whm/nginx-reverse-*****-on-cpanel-nginx-whm-admin.png?w=300&tok=caf36d[/IMG]
Creating automated temp files cleanupWhile using nginx as a reverse ***** has it's many benefits, not creating an automated temp cleanup can result in adverse performance.
Running crontab -e (for edit) opens /var/spool/cron/root as a temporary file for editing purposes. Perform the following:
crontab -e Add the following to the end of the list, ensuring not to edit existing rules:
0 */1 * * * /usr/sbin/tmpwatch -am 1 /tmp/nginx_client Press [CTRL] + X to save the changes. You'll be prompted, "Save modified buffer (ANSWERING "No" WILL DESTROY CHANGES) ?" Press Y and then [Enter]. You'll again be prompted, something similar to, "File Name to Write: /tmp/crontab.XXXXXX" , simple press [Enter] at this time. /usr/bin/crontab: installing new crontab This output confirms the new cron job was successfully installed.
https://bia2host.com/#هاست_لینوکس