Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

NGINX with PHP-FPM?

Discussion in 'General Discussion' started by hector_super, Jun 25, 2018.

Tags:
  1. hector_super

    hector_super Member

    Joined:
    Aug 4, 2016
    Messages:
    17
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Australia
    cPanel Access Level:
    Root Administrator
    Hi,

    I am giving some thought to running NGINX with PHP-FPM. However, I want the least painful setup, too many moving parts tend to eventually break.

    Would you suggest manually installing NGINX and managing it like a man (SSH etc) or does anyone have experience with cPanel plugins?

    I initially liked CPNginx but then read a bunch of bad reviews.

    I would have a Wordpress website with moderate traffic (15k visits per day) and reasonably dynamic content. Currently running Litespeed but considering jumping ship.

    Cheers
     
  2. webhostuk

    webhostuk Well-Known Member

    Joined:
    Sep 11, 2013
    Messages:
    138
    Likes Received:
    13
    Trophy Points:
    18
    Location:
    UK
    cPanel Access Level:
    Website Owner
    Twitter:
    If you want a manual installation article we do have one you can check: - Removed -
    Yes, nginx with php-FMP does help alot for high traffic website.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    #2 webhostuk, Jun 25, 2018
    Last edited by a moderator: Jun 25, 2018
  3. hector_super

    hector_super Member

    Joined:
    Aug 4, 2016
    Messages:
    17
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Australia
    cPanel Access Level:
    Root Administrator
    Thanks @webhostuk

    In your opinion, the NGINX + PHP-FPM setup, as compared to Litespeed, does it complicate ongoing maintenance and compatibility issues or would you say it is the same?

    I used to manage a server with NGINX and Apache behind it, this was ages ago. I remember down the track I regretted it because so many Wordpress plugins had issues and managing it in general was more problematic than the benefit of it vs a well tuned Litespeed. Then again, that was years ago and things have changed substantially.
     
  4. webhostuk

    webhostuk Well-Known Member

    Joined:
    Sep 11, 2013
    Messages:
    138
    Likes Received:
    13
    Trophy Points:
    18
    Location:
    UK
    cPanel Access Level:
    Website Owner
    Twitter:
    Comparing Nginx with paid Litespeed would not be fair. But usage wise we have used Nginx webserver with PHP_FPM for Magento hosting server which worked really well, as Magento is one heavy application to run on the shared server.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. hector_super

    hector_super Member

    Joined:
    Aug 4, 2016
    Messages:
    17
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Australia
    cPanel Access Level:
    Root Administrator
    Thanks @webhostuk

    Do you have any suggestions to install it on CentOS? A plugin in particular or just straight yum from epel?

    Everyone's thoughts are welcome
     
  6. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,749
    Likes Received:
    1,885
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello @hector_super,

    We generally see customers using plugins (e.g. Engintron, cPnginx) as opposed to manually installations, but I'll leave this thread open for additional user-feedback from others using Nginx. Keep in mind that Nginx is not supported, whereas LiteSpeed is:

    LiteSpeed Web Server Now Supported | cPanel Blog

    Additionally, I encourage you to vote for and monitor the following feature requests for official Nginx support in cPanel & WHM:

    Stand-alone nginx supported as an alternative to Apache
    Nginx proxied to Apache (not standalone Nginx)

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. hector_super

    hector_super Member

    Joined:
    Aug 4, 2016
    Messages:
    17
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Australia
    cPanel Access Level:
    Root Administrator
    Thanks @cPanelMichael

    The only plugin I found that supports NGINX with PHP-FPM is cPngninx, which I don't want to install for a number of reasons.

    I'll give it a try to install NGINX directly on CentOS.

    Now a few quations, I hope you can help me:

    1. If I follow these steps: hostinger.com/tutorials/how-to-install-lemp-centos7 (skipping PHP7 and MariaDB installation of course) will cPanel overwrite the PHP-FPM settings on an update or in any other way conflict with the changes made to FPM?

    2. Would NGINX coexist with Apache, some users using one and some using the other? Or will I have to port all accounts to NGINX?

    3. In a scenario with NGINX + PHP-FPM, do the PHP executions receive the user's IP address? I would think so because, as I understand it, it is not being proxied, is this correct? Back in the day I had a server with NGINX proxying Apache and it was a bit of a mess.

    Thanks again
     
    #7 hector_super, Jun 27, 2018
    Last edited by a moderator: Jun 27, 2018
  8. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,749
    Likes Received:
    1,885
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello @hector_super,

    Manually installing the Nginx RPM is unsupported, and won't integrate with EasyApache 4. If you wanted to build your own custom Nginx RPM for use with EasyApache 4, then the following resource is a good place to start:

    Tutorial - Building Custom Packages For EasyApache 4

    Keep in mind this will require advanced technical skills due to the amount customization involved, and is not something we can support. I highly recommend using an existing plugin, or considering an alternative such as LiteSpeed instead.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice