Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: Installing Nginx Support  (Read 20764 times)

0 Members and 1 Guest are viewing this topic.

lathu_official

  • Guest
Installing Nginx Support
« on: January 04, 2014, 02:19:53 pm »
Switching a system from the Apache webserver (installed by default by Virtualmin) to Nginx should only be done if no virtual servers with websites have been created yet. Ideally the change should be done on a freshly installed system, running RHEL 6.0, CentOS 6.0 or Debian 6.0 or later. Virtualmin version 3.89 or above is also required.


The steps to remove Apache and install Nginx are :


1)Shut down Apache with the command /etc/init.d/httpd stop ; service httpd off (on RHEL or CentOS), or/etc/init.d/apache2 stop ; update-rc.d apache2 remove (on Debian).

2)Install Nginx with the command yum install nginx (on RHEL or CentOS) or apt-get install nginx (on Debian).
Start the Nginx webserver with the command /etc/init.d/nginx start

3)Install Virtualmin's Nginx plugin with the command yum install wbm-virtualmin-nginx wbm-virtualmin-nginx-ssl (on RHEL or CentOS) or apt-get install webmin-virtualmin-nginx webmin-virtualmin-nginx-ssl (on Debian).



Once this is done, you can configure Virtualmin to use it as follows :


1)Login to Virtualmin as root, and go to Webmin -> Servers -> Nginx Webserver and make sure that Nginx and its configuration files are found.

2)If not, click on the Module Config link and set the config and command paths correctly.

3)Return to Virtualmin, and go to System Settings -> Features and Plugins.

4)Un-check the "Apache website" , "SSL website" and "DAV Login", "Mailman", "Protected web directories", "AWstats reporting" and "Subversion repositories" features.

5)Check the "Nginx website" and "Nginx SSL website" features, then click "Save".

6)If Virtualmin reports that any other features cannot be used without Apache, go back and de-select them too.

7)Go to the System Information page and click Refresh system information in the top right.

8)Verify that Nginx is shown as running in the "Status" section.


-----------
Thanks.