Hello.
I have recently set up NGINX as a reverse proxy using WHM at a server of mine. Some PHP applications rely on
variable in order to gzip output content, however it seems that settings at /includes-optional/cpanel-proxy.conf prevent the variable from being set and passed to Apache at the following line:
What I would like to configure is:
however, due to the conf file hierarchy set by cPanel, there is no way I can override this line. Below is an example of a user specific file (/etc/nginx/conf.d/users/USERX.conf) as set by cPanel, and it is the last "block" that is processed before passing the request to Apache:
As you can see, there is no way I can override cpanel-proxy.conf. Note that includes-optional/cpanel-proxy.conf and /users/USERX.conf files are always overwritten when NGINX is updated or NGINX settings change, for example at NGINX® Manager.
Can anybody suggest a simple workaround? Do you agree that cpanel-proxy.conf should be overridable? Is there somekind of a "template" of /includes-optional/cpanel-proxy.conf that I can edit, in order to be used when cPanel updates this file?
Thank you in advance for your replies!
I have recently set up NGINX as a reverse proxy using WHM at a server of mine. Some PHP applications rely on
PHP:
$_SERVER['HTTP_ACCEPT_ENCODING']
NGINX:
proxy_set_header Accept-Encoding ""; # Optimize encoding
NGINX:
proxy_set_header Accept-Encoding $http_accept_encoding;
NGINX:
### main domain for USERX##
server {
....
location / {
...
include conf.d/includes-optional/cpanel-proxy.conf;
proxy_pass $scheme://$CPANEL_APACHE_PROXY_REQ_IP:$CPANEL_APACHE_PROXY_REQ_PORT;
}
...
}
Can anybody suggest a simple workaround? Do you agree that cpanel-proxy.conf should be overridable? Is there somekind of a "template" of /includes-optional/cpanel-proxy.conf that I can edit, in order to be used when cPanel updates this file?
Thank you in advance for your replies!
Last edited: