Nginx Reverse Proxy with WordPress / WooCommerce

mpassos

Registered
May 20, 2021
1
0
1
Brazil
cPanel Access Level
Website Owner
Hi there,

I run a dedicated 8vcpu/16gb server with whm/cpanel on centos7. I run cpanel / whm 96.0.11 at hostgator.

I have a woocommerce store with 17k+ products that are updated daily.

I want to install nginx as reverse proxy with cache but I would have to add / edit to the configuration file for adding the wordpress / woocommerce tweaks.

1) How can I add to the configuration file without breaking the server? I need to add cache specific configuration for WP and WC. Per se, it says in the docs that "if your application send GET requests you should send cache headers... etc"... I need to deal with that by excluding GET / POST requests in the configuration file.. so how can I do that without breaking everything?
2) I did a manual instalation of wordpress. Should I add it to cpanel's application manager before installing nginx reverse proxy via nginx manager so the instalation would manage my wordpress install and add the needed configurations?
3) Will my permalinks work out of the box? have to add the sites to application manager? My redirects will work out of the box?
4) I have 3 domais on this server. 2 of them redirect to the other one. Will installing naginx as reverse proxy have an effect on the redirects? they redirect to the main domain using wildcards/
5) If anything goes wrong... for instance: I can access the wp-rest api anymore... or something else... if I UNINSTALL NGINX via NGINX MANAGER.. will it reverse to the previous configuration? for sure?
6) If I delete the cache directory for my user.. does it purge the cache or will I have to do something else?
7) I plan to use opcache... should I be worried about something? Or do they both would work out of the box?


Thanks a lot. I am a fan of cpanel and whm. They sure do a hell of a good job! Excleent!

Looking to hear from you soon! Ciao!
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
6,915
910
313
cPanel Access Level
Root Administrator
Hey there! I'll go through and answer these in order to make sure I don't miss anything.

1 - There are details on how to make configuration changes here:


Let me know if you need something specific related to that.
2 - There is no reason this would need to be managed by the cPanel tools as that isn't connected with Nginx in any way.
3 - I would expect this to work just fine.
4 - I would also expect this to work just fine.
5 - That's correct - it will revert the configurations and put everything back as it was.
6 - Once Nginx is installed you can disable the cache for the user in the Nginx Manager interface. Details on that are outlined here: NGINX with Reverse Proxy | cPanel & WHM Documentation
7 - I would expect these to work well together by default without any additional configuration needed. We really have tried to make this as automated as possible.