Plesk for Linux
kb: technical
ABT: Group B
Applicable to:
- Plesk for Linux
Symptoms
-
gzip compression has been enabled for a domain according to this KB article.
-
Online optimization test tools like Google PageSpeed Insights show that gzip compression is not enabled for a this domain.
Cause
Responses are compressed by Apache and then decompressed by nginx when the options Smart static files processing and Serve static files directly by nginx are enabled for a domain in Plesk at Domains > example.com > Apache & nginx Settings.
Resolution
Apply one of the following solutions:
-
Enable gzip compression directly in nginx (Recommended).
-
Configure nginx to keep responses as is:
-
Go to Domains > example.com > Apache & nginx Settings.
-
Disable the options Smart static files processing and Serve static files directly by nginx
-
Apply the changes.
Comments
7 comments
In my case, Smart static files processing is checked but it's not allowed to change, why is it?
Hello @Khang Tran,
That is because Proxy Mode is disabled, and thus domain is using nginx only not using Apache at all.
If you want Apache gzip compression to be used - enable proxy mode.
Otherwise, enable compression for nginx: How to enable gzip compression in nginx on a Plesk server.
Can i disable Smart static files processing and Serve static files directly by nginx but still use Nginx caching under wordpress tool kit?
Hello @iamkingsleyf !
Yes, you can disable options Smart static files processing and Serve static files directly by nginx but keep Enable nginx caching option enabled.
alright thanks
Hi @Kuzma Ivanov
Why does the recommended way is to Enable gzip compression directly in Nginx?
What advantage would have one over the other?
Hello @Jorge
In this way, compression will be enabled for both nginx and Apache web servers. And enabled options Smart static files processing and Serve static files directly by nginx continue to increase server response time, because requests are not proxied to Apache, but handled by nginx directly.
Please sign in to leave a comment.