Re: gzip compression only working with SSL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I removed the SSL parts of the virtual host and changed the port to 80 and the compression doesn't work. Please find below my config for the virtual host both for port 80 and SSL

Thanks for your help so far.

Cheers
Graeme

Normal VH
========
Listen 80

<VirtualHost *:80>
  ServerName <domain>
  DocumentRoot "D:/Website_Dev/cimage"
    SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ \
    no-gzip dont-vary
    SetEnvIfNoCase Request_URI \
    \.(?:exe|t?gz|zip|bz2|sit|rar)$ \
    no-gzip dont-vary
    SetEnvIfNoCase Request_URI \.pdf$ no-gzip dont-vary
  AddOutputFilterByType DEFLATE text/html text/plain text/xml text/_javascript_ application/x-_javascript_ application/xml application/xhtml+xml
  DeflateFilterNote Input instream
    DeflateFilterNote Output outstream
    DeflateFilterNote Ratio ratio
    DeflateCompressionLevel 9
    LogFormat '%t %r %{outstream}n/%{instream}n (%{ratio}n%%)' deflate
    CustomLog logs/deflate_main.log deflate
</VirtualHost>

SSL VH
======
Listen 443
  AddType application/x-x509-ca-cert .cer
  AddType application/x-pkcs7-crl    .crl
  SSLPassPhraseDialog builtin
  SSLSessionCache shmcb:c:/Apache2/logs/ssl_scache(512000)
  SSLSessionCacheTimeout 300
 
  <VirtualHost _default_:443>
    DocumentRoot "D:/Website_Dev/cimage"
    ServerName <domain>:443
    SSLEngine on
    SSLProtocol -all +SSLv2 +SSLv3
    SSLCipherSuite DHE-RSA-AES256-SHA:RC4+RSA:+HIGH:+MEDIUM:+SSLv2:+eNULL
    SSLCertificateFile conf/ssl.crt/server.crt
    SSLCertificateKeyFile conf/ssl.key/server.key
    BrowserMatch ".*MSIE.*" \
    nokeepalive ssl-unclean-shutdown \
    downgrade-1.0 force-response-1.0
   
    AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/_javascript_ application/xml application/xhtml+xml
    DeflateFilterNote Input instream
    DeflateFilterNote Output outstream
        DeflateFilterNote Ratio ratio
        DeflateCompressionLevel 9
        LogFormat '%t %r %{outstream}n/%{instream}n (%{ratio}n%%)' deflate
        CustomLog logs/deflate_main.log deflate
  </VirtualHost>

On 12/09/2007, Boyle Owen <Owen.Boyle@xxxxxxx > wrote:


> -----Original Message-----
> From: Graeme Walker [mailto: graeme.walker1@xxxxxxxxx]
> Sent: Wednesday, September 12, 2007 12:38 PM
> To: users@xxxxxxxxxxxxxxxx
> Subject: Re: [ users@httpd] gzip compression only working with SSL
>
> Hi,
>
> The Request contains the line:
>
> Accept-Encoding: gzip, deflate

Good.

>
> Yet the response doesn't have the Content-Encoding: gzip line.
>
> I tried disabling SSL altogether but the the compression
> still did not work.

You mis-understand. My conjecture is that SSL has nothing to do with
your problem. To prove this conjecture, I asked you to switch off SSL in
the SSL VH and then show that compression *still* works in that VH, even
with SSL off.

If you can demonstrate this, then you can forget about SSL and
concentrate on fixing the mod_gzip config problem...

Rgds,
Owen Boyle
Disclaimer: Any disclaimer attached to this message may be ignored.


> I will send on my config files when I get home.
>
> Cheers
> Graeme
>
>
> On 12/09/2007, Boyle Owen < Owen.Boyle@xxxxxxx> wrote:
>
>       > -----Original Message-----
>       > From: Graeme Walker [mailto:graeme.walker1@xxxxxxxxx ]
>       > Sent: Wednesday, September 12, 2007 12:45 AM
>       > To: users@xxxxxxxxxxxxxxxx <mailto:users@xxxxxxxxxxxxxxxx >
>       > Subject: gzip compression only working with SSL
>       >
>       > Hi,
>       >
>       > I am using Apache 2.2.6, with mod_ssl and mod_deflate. I am
>       > unable to get gzip compression working on a non SSL
>       > connection. I have the deflate config in the main httpd.conf,
>       > which is identical to my virtual host for SSL, however only
>       > when connecting over SSL does the gzip compression work.
>
>       Compression and SSL are orthogonal -  that is, they've
> nothing to do
>       with each other and shouldn't interfere. So it sounds
> like a spurious
>       correlation. What's really the problem is that you have
> two VHs, one of
>       which is configured correctly for compression and the
> other that isn't.
>
>       To test, switch off SSL in the SSL-VH (just comment out all SSL
>       directives and then connect via http on the same port,
> eg 443). Do you
>       still get compression?
>
>       To investigate, look at the request and response
> headers (eg, with
>       liveHTTPHeaders in Firefox). Do they make sense?
>
>       To fix, double-check the config; are you sure
> mod_deflate is configured
>       the same in both VHs? Also, check content and clients -
> remember that a
>       client can refuse to accept compressed content and that
> some contents
>       are never compressed (eg, JPG)..
>
>       If you don't fix it, post back some config snippets.
>
>       Rgds,
>       Owen Boyle
>       Disclaimer: Any disclaimer attached to this message may
> be ignored.
>
>
>
>
>       >
>       > Any help would much appreciated as I have tried everything I
>       > can think of.
>       >
>       > Cheers
>       > Graeme Walker
>       >
>       >
>
>
>       This message is for the named person's use only. It may
> contain confidential, proprietary or legally privileged
> information. No confidentiality or privilege is waived or
> lost by any mistransmission. If you receive this message in
> error, please notify the sender urgently and then immediately
> delete the message and any copies of it from your system.
> Please also immediately destroy any hardcopies of the
> message. You must not, directly or indirectly, use, disclose,
> distribute, print, or copy any part of this message if you
> are not the intended recipient. The sender's company reserves
> the right to monitor all e-mail communications through their
> networks. Any views expressed in this message are those of
> the individual sender, except where the message states
> otherwise and the sender is authorised to state them to be
> the views of the sender's company.
>
>
> ---------------------------------------------------------------------
>       The official User-To-User support forum of the Apache
> HTTP Server Project.
>       See <URL: http://httpd.apache.org/userslist.html > for more info.
>       To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
>          "   from the digest:
> users-digest-unsubscribe@xxxxxxxxxxxxxxxx
> <mailto:users-digest-unsubscribe@xxxxxxxxxxxxxxxx >
>       For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx
>
>
>
>
>

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux