Antwort: [Mod_gzip] mod_ssl + mod_gzip (mod_gzip not compressing with mod_ssl)

Peter Marshall mod_gzip@lists.over.net
Tue, 15 Jul 2003 10:49:08 -0300


Problem solved.  Thanks again for the help.

I got rid of the include line for the mod_jk stuff and just put the contents
of it in the file.  (I needed to put the load balencer stuff in the 8810
virtual host, and every thing else I put outside the virtual hosts, and it
worked.

So now I have mod_gzip, mod_jk, mod_ssl, and mod_proxy all working together.


----- Original Message -----
From: "Peter Marshall" <peter.marshall@caris.com>
To: <mod_gzip@lists.over.net>
Sent: Tuesday, July 15, 2003 9:10 AM
Subject: Re: Antwort: [Mod_gzip] mod_ssl + mod_gzip (mod_gzip not
compressing with mod_ssl)


> Thanks.  I was able to get mod_ssl and mod_gzip to work together late
> yesterday. ( I did some major cleaning on the httpd.conf file ).  Thanks
for
> the heads up on the includes for the jkarta stuff.  I am not very fluent
in
> regular expressions, and when I was looking for stuff on it on newsgroups,
> that was a solution that was posted.  I will try taking out the extra
lines.
>
> I am now trying to get mod_jk working with everything  (mod_gzip, mod_ssl,
> mod_proxy, and mod_gzip).  I had mod_gzip and mod_proxy and mod_jk working
> together, but of course, nothing ever works the way you want it to.  The
> solution I have below works, but it is not exactly what I would like to
do.
> As you can see, just below, I am forced to use lines like this
>           ProxyPass         / http://myserver.com:17575/
> instead of lines like this:
>           ProxyPass         /abc/ http://myserver.com:17575/abc/
> This is causing my mod_jk to get done on a different apache server.    I
> would like to have the setup like below.
>
>  ____________      ____________
>   |                     |       |                      |
> |---------------|
>   |  Apache       |       |  Apache         |       |   IAS Apache  |
>   |  mod_ssl       |      |   mod_gzip     |        |  mod_plsql      |
>   |  mod_proxy  |      |   mod_proxy   |       |   port 17575    |
>   | port 8811     |       |  mod_jk         |       | ----------------
>   |                     |       |    port 8810   |
>   |-------------- |      ----------------
>
> but instead, because of the proxy setup shown above, I ineffect have this.
> (I would prefer to not have mod_jk on the same server as IAS.
>
> ____________      ____________
>   |                     |       |                      |
> |---------------|
>   |  Apache       |       |  Apache         |       |   IAS Apache  |
>   |  mod_ssl       |      |   mod_gzip     |        |  mod_plsql      |
>   |  mod_proxy  |      |   mod_proxy   |       |   port 17575    |
>   | port 8811     |       |               |       |       |   mod_jk
> |
>   |                     |       |    port 8810   |        ----------------
>   |-------------- |      ----------------
>
> Anyway, if you have any suggestions on how my config could be changed,
just
> let me know.  I have put the complete config below.
>
> Thanks again for the last reply.  It was very appreciated.
>
>
############################################################################
> ################
> ServerType standalone
> ServerRoot "/usr/local/apache"
> PidFile /usr/local/apache/logs/httpd.pid
> Timeout 300
> KeepAlive On
> MaxKeepAliveRequests 100
> KeepAliveTimeout 15
> MinSpareServers 5
> MaxSpareServers 10
> StartServers 5
> MaxClients 150
> MaxRequestsPerChild 0
>
> Listen 8810
> Listen 8811
>
> User apache
> Group apache
>
> LoadModule mmap_static_module libexec/mod_mmap_static.so
> LoadModule vhost_alias_module libexec/mod_vhost_alias.so
> LoadModule env_module         libexec/mod_env.so
> LoadModule config_log_module  libexec/mod_log_config.so
> LoadModule status_module      libexec/mod_status.so
> LoadModule ssl_module         libexec/libssl.so
> LoadModule cgi_module         libexec/mod_cgi.so
> LoadModule dir_module         libexec/mod_dir.so
> LoadModule access_module      libexec/mod_access.so
> LoadModule auth_module        libexec/mod_auth.so
> LoadModule anon_auth_module   libexec/mod_auth_anon.so
> LoadModule dbm_auth_module    libexec/mod_auth_dbm.so
> LoadModule headers_module     libexec/mod_headers.so
> LoadModule setenvif_module    libexec/mod_setenvif.so
> LoadModule gzip_module        libexec/mod_gzip.so
> LoadModule jk_module          libexec/mod_jk-1.3-noeapi.so
> LoadModule proxy_module       libexec/libproxy.so
>
> SSLRandomSeed startup builtin
> SSLRandomSeed connect builtin
>
> ########################################
> ####                                                                 ####
> ####                       Host 8810                          ####
> ####                                                                 ####
> ########################################
>
> <VirtualHost myserver.com:8810>
>   ServerAdmin peter.marshall@caris.com
>   servername myserver.com
>   DocumentRoot "/abc/wwwhome"
>
>   #DefaultType text/plain
>
>   ProxyVia On
>
>   ErrorLog /usr/local/apache/logs/error_log
>   LogLevel debug
>
>   LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\""
> combined
>   LogFormat "%h %l %u %t \"%r\" %>s %b" common
>   LogFormat "%{Referer}i -> %U" referer
>   LogFormat "%{User-agent}i" agent
>   CustomLog /usr/local/apache/logs/access_log common
>
>   ServerSignature On
>
>   <IfModule mod_proxy.c>
>
>           ProxyPass         / http://myserver.com:17575/
>           ProxyPassReverse  / http://myserver.com:17575/
>           ProxyPass         / http://myserver.com:17575/
>           ProxyPassReverse  / http://myserver.com:17575/
>           ProxyPass         / http://myserver.com:17575/
>           ProxyPassReverse  / http://myserver.com:17575/
>
>
>       ###    ProxyPass         /abc/ http://myserver.com:17575/abc/
>       ###    ProxyPassReverse  /abc/ http://myserver.com:17575/abc/
>       ###    ProxyPass         /abc/ http://myserver.com:17575/abc/
>       ###    ProxyPassReverse  /abc/ http://myserver.com:17575/abc/
>       ###    ProxyPass         /icons/ http://myserver.com:17575/icons/
>       ###    ProxyPassReverse  /icons/ http://myserver.com:17575/icons/
>
> </IfModule>
>
>  <IfModule mod_setenvif.c>
>       BrowserMatch "Mozilla/2" nokeepalive
>       BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0
> force-response-1.0
>       BrowserMatch "RealPlayer 4\.0" force-response-1.0
>       BrowserMatch "Java/1\.0" force-response-1.0
>       BrowserMatch "JDK/1\.0" force-response-1.0
>  </IfModule>
>
>      mod_gzip_on Yes
>      <FilesMatch ".(gif|jpg|png)">
>          mod_gzip_on No
>      </FilesMatch>
>      mod_gzip_dechunk Yes
>     mod_gzip_keep_workfiles No
>     mod_gzip_temp_dir /tmp
>     mod_gzip_item_include file \.htm$
>     mod_gzip_item_include file \.jsp$
>     mod_gzip_item_include file \.html$
>     mod_gzip_item_include file \.doc$
>     mod_gzip_item_include file \.js$
>     mod_gzip_item_include file \.do$
>     mod_gzip_item_include file "\.css$"
>     mod_gzip_item_include handler jakarta-servlet
>         mod_gzip_item_include mime text/.*
>     mod_gzip_item_include mime ^image/.*$
>     mod_gzip_item_include mime ^application/.*$
>     mod_gzip_item_exclude mime ^application/pdf$
>     mod_gzip_item_include handler proxy-server
>
>     LogFormat "%h %l %u %t \"%r\" %>s %b mod_gzip: %{mod_gzip_result}n
> In:%{mod_gzip_input_size}n
> Out:%{mod_gzip_output_size}n:%{mod_gzip_compression_ratio}npct." mod_gzip
>     CustomLog logs/mod_gzip_log mod_gzip
>
>     include "/usr/local/apache/conf/mod_jk.conf"
> </VirtualHost>
>
>
> ########################################
> ####                                                                 ####
> ####                       Host 8811                          ####
> ####                                                                 ####
> ########################################
>
> <VirtualHost myserver.com:8811>
>    DocumentRoot /usr/local/apache/htdocs
>    ServerName myserver.com:8811
>    ServerAdmin peter.marshall@caris.com
>    ErrorLog /usr/local/apache/logs/error_log
>    SSLLog      /usr/local/apache/logs/ssl_engine_log
>    SSLLogLevel info
>
>    SSLEngine on
>
>    SSLCertificateFile /usr/local/apache/conf/ssl.crt/server.crt
>    SSLCertificateKeyFile /usr/local/apache/conf/ssl.key/server.key
>
>    CustomLog /usr/local/apache/logs/ssl_request_log "%t %h
%{SSL_PROTOCOL}x
> %{SSL_CIPHER}x \"%r\" %b
>
>    ProxyRequests On
>    ProxyPass             / http://myserver.com:8810/
>    ProxyPassReverse / http://myserver.com:8810/
> </VirtualHost>
>
>
>
>
>
>
>
>
> ----- Original Message -----
> From: <Michael.Schroepl@telekurs.de>
> To: <mod_gzip@lists.over.net>
> Sent: Tuesday, July 15, 2003 6:49 AM
> Subject: Antwort: [Mod_gzip] mod_ssl + mod_gzip (mod_gzip not compressing
> with mod_ssl)
>
>
> >
> > Hi Peter,
> >
> >
> > > If I run just mod_gzip, everything is fine.  If I run just
> > > mod_ssl everything is fine as well.  But if I run mod_ssl
> > > and mod_gzip, then nothing gets compressed (but I do get
> > > the content on the webpage). I am not sure what the problem is.
> >
> > your SSL module seems to internally 'rewrite' the HTTP re-
> > quests (so that other modules should not interfere with them).
> >
> > Unfortunately, this tends to break your 'mod_item_include'
> > rules, and mod_gzip doesn't seem to accept the response
> > as to be compressed any more.
> > You would see that in the mod_gzip status code if you include
> > that to your log format.
> >
> > > ClearModuleList
> > > AddModule mod_mmap_static.c
> >
> > First you load all modules, then you clear the list again,
> > and then you add the modules? And do you actually need
> > all those modules? Think about removing 50% of these ...
> >
> > > LogFormat "%h %l %u %t \"%r\" %>s %b mod_gzip: %{mod_gzip_result}n
> >
> > Which values do you get for mod_gzip_result in your logs?
> >
> > <IfModule mod_gzip.c>
> >     mod_gzip_item_include file \.htm$
> >     mod_gzip_item_include file \.jsp$
> >     mod_gzip_item_include file \.html$
> >     mod_gzip_item_include file \.doc$
> >     mod_gzip_item_include file \.js$
> >     mod_gzip_item_include file \.do$
> >     mod_gzip_item_include file "\.css$"
> > You include your request on a "file" base only -
> >
> > > mod_gzip_item_include handler jakarta-servlet
> > > mod_gzip_item_include handler jakarta-servlet$
> > > mod_gzip_item_include handler ^^jakarta-servlet
> > > mod_gzip_item_include handler ^^jakarta-servlet$
> > > mod_gzip_item_include handler ^^jakarta-servlet$
> >
> > Of these five lines, the first one is a superset of the
> > four others (and no. 4 and 5 seem even to be duplicates).
> > You don't need all five; you only need one of them.
> > (Do you understand the regular expressions you use here?)
> >
> > > mod_gzip_item_include mime text/.*
> > > mod_gzip_item_include mime ^^image/.*$
> > > mod_gzip_item_include mime ^^application/.*$
> >
> > Looks reasonable to be - unless mod_proxy would not set any
> > MIME type for its output. I remember to have experienced a
> > problem of this type some time ago - you might want to add
> > the "Content-type" HTTP response header to your mod_gzip log.
> >
> > Regards, Michael
> >
> >
> > _______________________________________________
> > mod_gzip mailing list
> > mod_gzip@lists.over.net
> > http://lists.over.net/mailman/listinfo/mod_gzip
> >
>
> _______________________________________________
> mod_gzip mailing list
> mod_gzip@lists.over.net
> http://lists.over.net/mailman/listinfo/mod_gzip
>