Please do NOT post requests for help here. Use the Help forum for that.

TOPIC: [SOLVED] gzip compression

gzip compression 2 weeks 4 days ago #1

  • jprause
  • jprause's Avatar
  • Offline
  • Junior
  • Posts: 132
How can I enable gzip compression of the webtrees website?
Thanks for a hint.
Josef

local desktop:-- webtrees 1.7.14, PHP version 7.2.19, MySQL 5.7.25, Apache2 2.4.29, Linux Ubuntu 18.04 64bit
webhosting:-- webtrees 1.7.14, PHP version 7.2.19, MySQL 5.7.21
testing webtrees 2.0.0-beta.3
The administrator has disabled public write access.

gzip compression 2 weeks 4 days ago #2

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Posts: 11465
This is part of the webserver (apache) configuration - not webtrees.

Apache needs to have the "mod_deflate" library installed, and you can enable it using a line like this in your apache config file.

AddOutputFilterByType DEFLATE text/css text/html application/javascript
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net
The administrator has disabled public write access.

gzip compression 2 weeks 4 days ago #3

  • jprause
  • jprause's Avatar
  • Offline
  • Junior
  • Posts: 132
Thank you!
In my case it needs to add the following to .htaccess:
<IfModule mod_deflate.c>
  AddOutputFilterByType DEFLATE application/javascript
  AddOutputFilterByType DEFLATE application/json
  AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
  AddOutputFilterByType DEFLATE application/xhtml+xml
  AddOutputFilterByType DEFLATE application/xml
  AddOutputFilterByType DEFLATE application/font-sfnt
  AddOutputFilterByType DEFLATE font/otf
  AddOutputFilterByType DEFLATE font/ttf
  AddOutputFilterByType DEFLATE image/svg+xml
  AddOutputFilterByType DEFLATE image/vnd.microsoft.icon
  AddOutputFilterByType DEFLATE text/plain
  AddOutputFilterByType DEFLATE text/css
  AddOutputFilterByType DEFLATE text/xml
  AddOutputFilterByType DEFLATE text/html
</IfModule>

and the following to .user.ini:
zlib.output_compression = On
Josef

local desktop:-- webtrees 1.7.14, PHP version 7.2.19, MySQL 5.7.25, Apache2 2.4.29, Linux Ubuntu 18.04 64bit
webhosting:-- webtrees 1.7.14, PHP version 7.2.19, MySQL 5.7.21
testing webtrees 2.0.0-beta.3
The administrator has disabled public write access.

[SOLVED] gzip compression 2 weeks 4 days ago #4

  • jprause
  • jprause's Avatar
  • Offline
  • Junior
  • Posts: 132
Problem solved.
Josef

local desktop:-- webtrees 1.7.14, PHP version 7.2.19, MySQL 5.7.25, Apache2 2.4.29, Linux Ubuntu 18.04 64bit
webhosting:-- webtrees 1.7.14, PHP version 7.2.19, MySQL 5.7.21
testing webtrees 2.0.0-beta.3
The administrator has disabled public write access.
Powered by Kunena Forum