Guide to Setup Virtualmin with NGINX and PHP-FPM

Posted on July 03, 2013
virtualmin-graph

1. Install Webmin

create the /etc/yum.repos.d/webmin.repo file containing

fetch and install my GPG key with which the packages are signed, with the commands:

Install webmin with command:

2. Install Virtualmin

Create IP with hostname by adding the following line to /etc/hosts:

Verify hostname:

Install virtualmin:

3. Remove Apache and install Nginx

Shut down Apache with the command

4. Configure Virtualmin to use NGINX

  • Login to Virtualmin as root, and go to WebminServersNginx Webserver and make sure that Nginx and its configuration files are found.
  • If not, click on the Module Config link and set the config and command paths correctly.
  • Return to Virtualmin, and go to System SettingsFeatures and Plugins.
  • Un-check the “Apache website” , “SSL website” and “DAV Login”, “Mailman”, “Protected web directories”, “AWstats reporting” and “Subversion repositories” features.
  • Check the “Nginx website” and “Nginx SSL website” features, then click “Save”.
  • If Virtualmin reports that any other features cannot be used without Apache, go back and de-select them too.
  • Go to the System Information page and click Refresh system information in the top right.
  • Verify that Nginx is shown as running in the “Status” section.

5. Using NginX

  • Once Nginx support has been configured, you should be able to create virtual servers just as you would with Apache. However, on the Create Virtual Server page you will need to select Enable Nginx website? in theEnabled features section, instead of Enable Apache.
  • When creating a domain from the command-line API, you will need to use the flag instead of . For SSL websites, you will need to use –virtualmin-nginx-ssl instead of –ssl .
  • Similarly, when creating a domain via the remote API, you will need to use the Parameter instead of

6. Install PHP-FPM

Install RHEL EPEL repository:

Install spawn-fcgi if needed

Configure spawn-fcgi

Install php-fpm:

Related Posts

  • wizonesolutions

    Will Virtualmin + nginx actually use PHP-FPM with this configuration? Documentation says it uses FCGID by default.

  • Hm… I think you’re right. I haven’t played around with this configuration in a bit. I will have to try it and get back to you.

    • ilybbrian

      Did you ever figure out of Virtualmin is using PHP-FPM? I am just dabbling with it myself. Thanks for the helpful article!

      • Hi. I’m sorry to say that I haven’t had a chance to really dig into it any further. I did raise the topic to the devs, but I never heard back. Sorry about that.

        • Onurcan

          i’m looking for the same answer too. but thanks for your guide. i’m currently installing it.

  • Does this still work on 2016?

Contact Us

Have a question? Send us a message. We'll get back to you soon.

captcha

2 Shares
Share
Share1
Tweet
+11
Pin
Stumble