Applicable to:
- Plesk for Linux
Symptoms
-
gzip compression has been enabled according to the article "How to enable GZIP compression in Apache"
-
Online optimization test tools like Google PageSpeed Insights show that gzip compression is not enabled for a domain.
-
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.
Cause
Responses are compressed by Apache and then decompressed by nginx.
Resolution
Apply one of the following solutions:
-
Enable gzip compression directly in nginx (Recommended):
- Apply the following article: How to enable gzip compression on nginx
-
Or configure nginx to keep responses as is:
-
Navigate to Domains > example.com > Apache & nginx Settings
-
Disable options Smart static files processing and Serve static files directly by nginx and Apply 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.