Am 19.09.2016 um 19:56 schrieb Jacob Champion:
On 09/19/2016 10:12 AM, Eric Covener wrote:

I would prefer to keep them separate even if we have to teach something
to coordinate them (a module, some new support in mod_filter, some
kind of hook?)


+1. (If it proves difficult to make separate compression modules play
well together, that's a problem we should fix.)

agreed - however, below some configs where my brain rumours how have that identically behavior by just use "brotli" compression in case the cient supports it - maybe someone with deeper insights as my pure adiminstrator view has a idea by looking at it

the "no-gzip dont-vary" stuff is for long running scripts with output-flushing to give "realtime" feedback instead have it all buffered

one brainstorming: "AddOutputCompressionByType" provided by whatever module, proceed the Accept-Encoding of the client and deciding the compression algo

______________________________________

Logging to have the compression ratio in the access-logs

DeflateFilterNote       Ratio ratio_info
LogFormat "%a %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" (%{ratio_info}n%%)" combined
ErrorLog                "/Volumes/dune/www-servers/_logs/apache_error.log"
CustomLog "/Volumes/dune/www-servers/_logs/apache_access.log" combined
LogLevel                notice core:info
______________________________________

[root@testserver:~]$ cat /etc/httpd/conf/httpd-deflate.conf
DeflateCompressionLevel 2
DeflateBufferSize 32768

<Directory "/">
 AddOutputFilterByType DEFLATE text/html
 AddOutputFilterByType DEFLATE text/javascript
 AddOutputFilterByType DEFLATE text/css
 AddOutputFilterByType DEFLATE text/plain
 AddOutputFilterByType DEFLATE text/xml
 AddOutputFilterByType DEFLATE text/x-component
 AddOutputFilterByType DEFLATE application/xhtml+xml
 AddOutputFilterByType DEFLATE application/xml+rss
 AddOutputFilterByType DEFLATE application/rss+xml
 AddOutputFilterByType DEFLATE application/xml
 AddOutputFilterByType DEFLATE application/javascript
 AddOutputFilterByType DEFLATE application/x-javascript
 AddOutputFilterByType DEFLATE application/msword
 AddOutputFilterByType DEFLATE application/msexcel
 AddOutputFilterByType DEFLATE application/mspowerpoint
 AddOutputFilterByType DEFLATE application/msaccess
 AddOutputFilterByType DEFLATE application/mshelp
 AddOutputFilterByType DEFLATE application/pdf
 AddOutputFilterByType DEFLATE application/postscript
 AddOutputFilterByType DEFLATE audio/x-wav
 AddOutputFilterByType DEFLATE text/rtf
 AddOutputFilterByType DEFLATE text/comma-separated-values
 AddOutputFilterByType DEFLATE text/tab-separated-values
 AddOutputFilterByType DEFLATE text/vnd.wap.wml
 AddOutputFilterByType DEFLATE text/vnd.wap.wmlscript
 AddOutputFilterByType DEFLATE text/vnd.wap.wmlscript
 AddOutputFilterByType DEFLATE application/vnd.wap.wmlc
 AddOutputFilterByType DEFLATE text/x-setext
 AddOutputFilterByType DEFLATE text/x-sgml
 AddOutputFilterByType DEFLATE text/x-speech
 AddOutputFilterByType DEFLATE application/x-sh
 AddOutputFilterByType DEFLATE application/x-latex
 AddOutputFilterByType DEFLATE application/x-httpd-php-source
 AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
 AddOutputFilterByType DEFLATE font/ttf
 AddOutputFilterByType DEFLATE font/otf
 AddOutputFilterByType DEFLATE font/x-woff
 AddOutputFilterByType DEFLATE image/svg+xml
AddOutputFilterByType DEFLATE application/vnd.ms-word.document.macroEnabled.12 AddOutputFilterByType DEFLATE application/vnd.openxmlformats-officedocument.wordprocessingml.document AddOutputFilterByType DEFLATE application/vnd.ms-word.template.macroEnabled.12 AddOutputFilterByType DEFLATE application/vnd.openxmlformats-officedocument.wordprocessingml.template AddOutputFilterByType DEFLATE application/vnd.ms-powerpoint.template.macroEnabled.12 AddOutputFilterByType DEFLATE application/vnd.openxmlformats-officedocument.presentationml.template AddOutputFilterByType DEFLATE application/vnd.ms-powerpoint.addin.macroEnabled.12 AddOutputFilterByType DEFLATE application/vnd.ms-powerpoint.slideshow.macroEnabled.12 AddOutputFilterByType DEFLATE application/vnd.openxmlformats-officedocument.presentationml.slideshow AddOutputFilterByType DEFLATE application/vnd.ms-powerpoint.presentation.macroEnabled.12 AddOutputFilterByType DEFLATE application/vnd.openxmlformats-officedocument.presentationml.presentation AddOutputFilterByType DEFLATE application/vnd.ms-excel.addin.macroEnabled.12 AddOutputFilterByType DEFLATE application/vnd.ms-excel.sheet.binary.macroEnabled.12 AddOutputFilterByType DEFLATE application/vnd.ms-excel.sheet.macroEnabled.12 AddOutputFilterByType DEFLATE application/vnd.openxmlformats-officedocument.spreadsheetml.sheet AddOutputFilterByType DEFLATE application/vnd.ms-excel.template.macroEnabled.12 AddOutputFilterByType DEFLATE application/vnd.openxmlformats-officedocument.spreadsheetml.template
</Directory>

SetEnvIfNoCase Request_URI (download.php)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI (download_imgzip.php)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI (presse_download_zip.php)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI (content_sub_move.php)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI (synch.php)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI (import.php)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI (admin_imagecopyrights.php)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI (newsletter.php)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI (importer.php)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI (create.php)$ no-gzip dont-vary

# Properly handle requests behind proxies
<IfModule mod_headers.c>
 <FilesMatch "\.(php)$">
  Header append "Vary" "User-Agent"
 </FilesMatch>
<FilesMatch "\.(gif|jpe?g|png|htm|html|xml|sgm|sgml|css|js|txt|htc|ico|flv|mp4|m4v|wmv|mov|mpg|ogv|webm|mp3|wav|ogg|oga|swf|doc|docx|xls|xlsx|ppt|pptx|pdf|eot|ttf|otf|woff)$">
  Header unset "Vary"
 </FilesMatch>
<FilesMatch "\.(htm|html|xml|sgm|sgml|css|js|txt|htc|wav|doc|docx|xls|xlsx|ppt|pptx|pdf|eot|ttf|otf|woff)$">
  Header set "Vary" "Accept-Encoding"
 </FilesMatch>
</IfModule>

Reply via email to