Opened 6 years ago

Closed 6 years ago

#12180 closed task (fixed)

Please configure yatei's Apache to compress CollecTor's responses

Reported by: karsten Owned by:
Priority: Medium Milestone:
Component: Internal Services/Tor Sysadmin Team Version:
Severity: Keywords:
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


I'd like to have Apache compress all of CollecTor's responses which are not already .xz compressed and only if the client supports it. In particular, the files in /recent/ should all be compressed (if the client supports it).

I know that yatei's Apache serves more than just CollecTor, so maybe we'll want to configure this in /srv/ I can create that file, but what do I put in, and what Apache modules need to be installed/enabled for this?

Child Tickets

Change History (5)

comment:1 Changed 6 years ago by karsten

I tested this a bit on a local Apache to figure out how to handle compressed responses in Java. Turns out adding the following to /etc/apache2/sites-available/ might work (untested for yatei's case, though!):

<Location />
  <IfModule mod_deflate.c>
    SetOutputFilter DEFLATE
    SetEnvIfNoCase Request_URI \.(xz|bz2)$ no-gzip

comment:2 Changed 6 years ago by weasel

This If really looks icky. Isn't there a better way?

comment:3 Changed 6 years ago by weasel

A "nicer" way would be to enable this by content type, as we do for www.tpo:

AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css

comment:4 Changed 6 years ago by karsten

Sounds good. I just added a .htaccess file to the recent/ directory, so that all files have Content-Type: text/plain.

Can you enable compression by content type as suggested?

comment:5 Changed 6 years ago by weasel

Resolution: fixed
Status: newclosed

the .htaccess provided content-type didn't help us here. now compressing everything in /recent/, if acceptable for the client.

Note: See TracTickets for help on using tickets.