• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Question mod_gzip - apache

futureweb

Regular Pleskian
Hello,
somewhere the option to activate mod_gzip for Plesk Hostings? (Apache)
Haven't really found much about that ...
thx
Andreas Schnederle-Wagner
 
Hello,
somewhere the option to activate mod_gzip for Plesk Hostings? (Apache)
Haven't really found much about that ...
thx
Andreas Schnederle-Wagner

Hello futureweb, do you use nginx in proxy-mode with Apache ?
For apache only you can add the following options in your .htaccess :

Code:
<IfModule mod_gzip.c>
   mod_gzip_on Yes
   mod_gzip_can_negotiate Yes
   mod_gzip_static_suffix .gz
   AddEncoding gzip .gz
   mod_gzip_update_static No
   mod_gzip_command_version '/mod_gzip_status'
   mod_gzip_temp_dir /tmp
   mod_gzip_keep_workfiles No
   mod_gzip_minimum_file_size 500
   mod_gzip_maximum_file_size 500000
   mod_gzip_maximum_inmem_size 60000
   mod_gzip_min_http 1000
   mod_gzip_handle_methods GET POST
   mod_gzip_item_exclude reqheader "User-agent: Mozilla/4.0[678]"
   mod_gzip_item_include file \.html$
   mod_gzip_item_include file \.htm$
   mod_gzip_item_include file \.php3$
   mod_gzip_item_include file \.php$
   mod_gzip_item_include file \.js$
   mod_gzip_item_include file \.css$
   mod_gzip_item_include mime ^text/
   mod_gzip_item_exclude mime ^httpd/unix-directory
   mod_gzip_item_exclude mime ^image/
   mod_gzip_dechunk Yes
   mod_gzip_add_header_count Yes
   mod_gzip_send_vary Yes
</IfModule>

If you use nginx in proxy-mode for Apache , add the following code in Additional nginx directives :

Code:
# Enable Gzip compression
gzip on;
gzip_disable "msie6";
 gzip_vary on;
 gzip_proxied any;
 gzip_comp_level 6;
 gzip_buffers 16 8k;
 gzip_http_version 1.1;
 gzip_types
 application/atom+xml
 application/javascript
 application/json
 application/rss+xml
 application/vnd.ms-fontobject
 application/x-font-ttf
 application/x-web-app-manifest+json
 application/xhtml+xml
 application/xml
 font/opentype
 image/svg+xml
 image/x-icon
 text/css
 text/plain
 text/x-component
 text/xml
 text/javascript;
 
hey virtubox,
thx for you answer - no nginx active. So no direct possibility within Plesk ... ok - guess the .htaccess Way is also doable by our customers which ask for mod_gzip ... ;-)
Same with mod_deflate I guess ...

Code:
<IfModule mod_deflate.c>
    AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css text/javascript application/javascript
</IfModule>

thx
Andreas
 
btw) inserted it into Plesk "Web Server Settings" ... so it won't conflict with Users .htaccess ...

Would be great if one could create such Settings within Service-Plans - Addons ...
 
anyone also thinking Apache Settings as Addons would be a great Feature ... please Upvote! ;-)

Apache Settings as Service Plan - Addons

Hello futureweb, you can add Apache and Nginx settings for your service plans :

Screenshot115.png
 
No addons will use the same settings than your service plan. But gzip should always enbled so it may not be required to have more apache settings in Addons plans
 
mod_gzip/mod_deflate is just an example ... some of our Customers need mod_geoip, mod_whatever ... Modules which I don't want to activate for all Customers - so Apache Directives within Addons would be (IMHO) really cool ... ;-)
 
mod_gzip/mod_deflate is just an example ... some of our Customers need mod_geoip, mod_whatever ... Modules which I don't want to activate for all Customers - so Apache Directives within Addons would be (IMHO) really cool ... ;-)

If Apaches modules are enabled, additional settings should be set with .htaccess files. Or you will have to create hundred addons for each module.
 
Back
Top