Anyone using "NGINX with Reverse Proxy" feature? What do you think?

electric

Well-Known Member
Nov 5, 2001
789
10
318
Is anyone using the new (cpanel version 96) NGINX with Reverse Proxy feature?

What do you think about it?

Has it created any problems? Is your web server faster? Is load reduced?

Have customers complained or noticed any change?

Thanks!
 
Last edited by a moderator:
  • Like
Reactions: cPRex

henker

Well-Known Member
May 1, 2003
64
1
233
Poland
cPanel Access Level
Root Administrator
TX @cPRex - submitted a ticket and also suggested to use
Code:
worker_processes  auto;
in nginx.conf and enable http2 by default.

Actually it's not an odd behaviour - stats should be "quiet" though, e.g., no output - just as it is with Apache logstats.
 

sahostking

Well-Known Member
May 15, 2012
389
16
68
Cape Town, South Africa
cPanel Access Level
Root Administrator
Twitter
I think it works great. One thing I do have an issue with is once enabled customers complain that when they change things on their website they cant clear cache?

They keep contacting us to clear the cache if their site is html. Don't think wordpress sites have issues though as that goes through apache? its possible there may be issues there with image or template changes in backend? Thoughts on that.

Update:
Found the below now as update. Maybe I should give it another try

2021-5-19

ea-nginx

  • EA-9774: Ensure logs are rotated daily.
  • ZC-8830: Fix cache clearing bug w/ cache.
  • ZC-8817: clear cache on certain ops.
 
Last edited:

BACg

Registered
Oct 8, 2015
4
0
51
Florida
cPanel Access Level
Root Administrator
Works well and integrates with Cloudflare. As mentioned prior, I've had to manually clear the cache for site updates to be seen and this includes WordPress as well. Would be nice if it were possible to clear the cache only for a specific url instead of the entire site.
 

jhawkins003

Active Member
Jun 24, 2014
36
7
58
cPanel Access Level
Root Administrator
I was actually about to make a specific post about getting the new NGINX cache running reliably with WordPress. We've had to pull NGINX from production while we develop a solution since our users were so significantly impacted.

There are plugins available that allow for automatically purging the cache such as Nginx Cache and Nginx Helper but it's not clear any of these solutions work in this case because the cache files in the cPanel implementation are owned by the system and not the user.

Any thoughts or suggestions would definitely be appreciated as this has become a roadblock for us.
 

jhawkins003

Active Member
Jun 24, 2014
36
7
58
cPanel Access Level
Root Administrator
Thanks for all the great feedback. I've let our webserver team know about the caching issues so they are looking into some options to help with that, and they are keeping an eye on this thread.
Sounds great! Thanks for the update and we would definitely be interested in any advice the cPanel team might have.
 
  • Like
Reactions: cPRex

RobinF28

Active Member
Jun 27, 2015
42
8
58
Elgin, Scotland
cPanel Access Level
Root Administrator
I have just installed it on one of our production servers (VPS) through the SOFTWARE interface and have had two clients note that their WordPress edits/updates were not flushing out to the 'world'!

The "previews" [Preview Changes] on edits to pages/posts were showing correct, and showed the updated work, but when they checked their live WordPress site(s) on say a different browser afterwards (after clearing all browser caches etc.), it returned the 'old' pages and data, so the reverse proxy cache was NOT being cleared/updated.

I was able to "fix" this by manually flushing the NGINX cache for their particular site.

This will shortly cause me to revert the implementation of the NGINX cache on WHM, sorry. It's too unusable in this buggy state. We have many WP sites on WHM and need the NGINX service to recognize when site Admins are editing their sites and making changes to live websites - as they do!

I would be happy to discuss / help if necessary.
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
6,919
910
313
cPanel Access Level
Root Administrator
@RobinF28 - what you're seeing is actually the intended behavior of the software. Nginx by default caches requests, which lowers the burden on Apache and speeds up results for customers. If you make an update to a site you'll need to either wait for the cache to time out, which can be up to an hour by default, or you'll need to manually clear it.

This of it as a basic sedan versus a sports car. The sedan gets you from point A to point B just fine, but the sports car needs more fine-tuning for that extra performance. Nginx is just another layer of fine-tuning.
 

jhawkins003

Active Member
Jun 24, 2014
36
7
58
cPanel Access Level
Root Administrator
@RobinF28 - what you're seeing is actually the intended behavior of the software. Nginx by default caches requests, which lowers the burden on Apache and speeds up results for customers. If you make an update to a site you'll need to either wait for the cache to time out, which can be up to an hour by default, or you'll need to manually clear it.

This of it as a basic sedan versus a sports car. The sedan gets you from point A to point B just fine, but the sports car needs more fine-tuning for that extra performance. Nginx is just another layer of fine-tuning.
Hi Rex! Unfortunately Im afraid I have to agree with RobinF28.

Although this behavior is indeed how caching works, providing little way to address the ramifications for CMS's like WordPress is a non-starter for us and I believe many other hosts. This is the reason that the popular Nginx Helper plugin exists and ISP's like Inmotion have great tools like those discussed at NGINX Cache Management to aid in managing a cache impact to CMS's.

One of the problems with the cPanel implementation is that the cache is not manageable via user account permissions - so solutions that exist in the user space can't be used. The only remedy is to have the host admin purge the cache every time a service request comes in for a client who is trying to update a website, which is obviously not sustainable at scale.

We are in the same boat as Robin, and reached the exact same conclusion. In its current state the cPanel NGINX is simply unusable in production scenarios where CMS's like WordPress are actively used by clients and users - which for us constitutes the majority of our accounts.
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
6,919
910
313
cPanel Access Level
Root Administrator
@jhawkins003 and @RobinF28 and @sahostking - I only have good news on this one! I spoke with one of the web server developers and there is end-user cache control planned for version 100! I'm going to send you a group message to coordinate some additional research on this, but it sounds like we'll have this available soon.
 

RobinF28

Active Member
Jun 27, 2015
42
8
58
Elgin, Scotland
cPanel Access Level
Root Administrator
Yes, I'm happy to give feedback/input, as suggested. Monday looks good at the moment.

FYI: I was pondering on this WHM implementation of NGINX cache, and a comparison with an "Application & Server" bolt-on like LiteSpeed Cache, where there is an active link (API?) between the Application (Wordpress, with the LS plugin) and the host Server (Apache/LiteSpeed) allowing automatic data flushing when a newer version is committed/available. Perhaps this is the holy-grail - but is this a possibility in the future? :)
 

leonep

Well-Known Member
Nov 18, 2014
168
10
68
Pescara
cPanel Access Level
Root Administrator
Hi,
For now I have disabled the cache for users who need frequent updates.
For other users I have communicated that it is enough to wait 1 hour or to request manual update.
It is annoying but the benefits of nginx feel good.
We are waiting for the modification in cpanel that the user can set the timeout, disable the cache or request update ....

THANK YOU
 
  • Like
Reactions: cPRex