PDA

توجه ! این یک نسخه آرشیو شده میباشد و در این حالت شما عکسی را مشاهده نمیکنید برای مشاهده کامل متن و عکسها بر روی لینک مقابل کلیک کنید : نصب nginx در سی پنل



a1994n1373
September 11th, 2017, 01:19
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.



wget http://nginxcp.com/latest/nginxadmin.tar



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:



https://www.knownhost.com/wiki/_media/control-panels/cpanel-whm/nginx-reverse-*****-on-cpanel-new-access-key.png?w=300&tok=38b370 (https://www.knownhost.com/wiki/_media/control-panels/cpanel-whm/nginx-reverse-*****-on-cpanel-new-access-key.png)



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.https://www.knownhost.com/wiki/_media/control-panels/cpanel-whm/nginx-reverse-*****-on-cpanel-nginx-whm-admin.png?w=300&tok=caf36d (https://www.knownhost.com/wiki/_media/control-panels/cpanel-whm/nginx-reverse-*****-on-cpanel-nginx-whm-admin.png)
Creating automated temp files cleanup
While 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/#هاست_لینوکس

m2n
September 11th, 2017, 12:56
عزیز یکم توضیح میدی اینا چین اینجا کپی کردی؟@-)

a1994n1373
September 11th, 2017, 13:02
عزیز یکم توضیح میدی اینا چین اینجا کپی کردی؟@-)

نصب nginx_apache_reverse به زبان ساده 100 % تست شده .