Link to home
Start Free TrialLog in
Avatar of Rowley
RowleyFlag for United Kingdom of Great Britain and Northern Ireland

asked on

mod_deflate & ssl on apache

- Server is ubuntu 8.10
- Apache is 2.2.9

Just wondered. I have a HTTP vhost that has some config as displayed in the code snippet. Would I need to replicate the same entry for the 443 vhost for the same server name? Is there any point in compressing then encrypting (could be vice-versa...not sure).

If not, what should I be doing. Help, suggestions, etc. most welcome.
<IfModule mod_deflate.c>
    SetOutputFilter DEFLATE
    BrowserMatch ^Mozilla/4 gzip-only-text/html
    BrowserMatch ^Mozilla/4\.0[678] no-gzip
    BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
    # Don't compress images or txt
    SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png|txt|lx2|pdf)$ no-gzip dont-vary
  </IfModule>

Open in new window

Avatar of andel7
andel7
Flag of Israel image

As far as I know the encryption happens (in term of TCPIP) before the compression (Application Layer) so basically you can't compress before encrypt.

ASKER CERTIFIED SOLUTION
Avatar of Andy Scutt
Andy Scutt
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I forgot to answer your first question... the compression can be enabled system wide if done in the main httpd.conf file outside of the default server config section. Or you can do it on a per vhost level.
Avatar of Rowley

ASKER

Scutty,

Thanks for the reply and sorry for the delay in getting back to you.

Yes indeed we are hosting a webapp where users log in etc...so the recommendation might be to turn this off eh? Do you have any sources where I can do some further reading on the subject?
We turned it off as the number of client support calls due to cache issues was ridiculous, its amazing how many corporates use old versions of IAS which are "broken" from a standards point of view.

I would suggest you experiment though if you have the time as you may be able to use it for certain file types/pages in your system and you can set the compression up in many many ways, for example:
 - per apache host
 - per vhost
 - per subdirectory of a site
 - per file type
So you may get some benefits from it.

Docs wise I'd suggest google and a search for : mod_deflate apache
Theres lots of sites about how to user and various sample configs.

Avatar of Rowley

ASKER

Thanks for having a go. Whilst not completely answering my question your shared experience is valuable info nonetheless.

Cheers.