Sponsored Content
Special Forums UNIX and Linux Applications Apache problem: mod_deflate with mod_proxy Post 302269853 by otheus on Thursday 18th of December 2008 08:31:55 PM
Old 12-18-2008
Apache problem: mod_deflate with mod_proxy

I am using Apache 2.2.3 on RHEL5 and having problems to get mod_deflate work with mod_proxy. mod_deflate will compress files by mime-type just fine as long as those files are served statically from the local server. However, files served via dynamic php application (ie, MediaWiki) or via reverse-proxy site (port 8000 on localhost) don't get compressed at all. (They get served as uncompressed just fine).

Just in case, I checked with the ASF bug report list and found that a related bug was fixed in 2.2.2. This bug was very specifically related to this problem, and so just in case, I logged this as "Reopen". But maybe I have a stupid config error someone can see?

Code:
LoadModule proxy_module modules/mod_proxy.so
LoadModule deflate_module modules/mod_deflate.so

AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE text/rtf
AddOutputFilterByType DEFLATE text/javascript
AddOutputFilterByType DEFLATE application/x-javascript

# Exclude Mozilla 4 (and compatible browsers) cannot handle deflation
BrowserMatch ^Mozilla/4             gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678]     no-gzip
# early IE6 cannot handle deflation of non-html files.
# (not sure about IE5)
BrowserMatch \bMSIE\s(6)            !no-gzip
# IE 7+ fine. Only IE 7 tested
BrowserMatch \bMSIE\s([7-9]|1[0-9]) !no-gzip !gzip-only-text/html

<Directory />
RewriteEngine   On
RewriteRule     ^/(.*\.php)$    http://localhost:8000/$1    [P,PT]
</Directory>

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Apache 2.2 problem

Hi all, I'm a user of Debian 4.0. I installed apache 2.2 and add the functionality to support ~/public_html for each user. This is the permission of my public_html: drwxr-xr-x 4 mj test 4096 2007-12-20 20:17 public_html When I wanted to go through it and list the directory via my browser,... (6 Replies)
Discussion started by: mjdousti
6 Replies

2. UNIX for Advanced & Expert Users

Double question: Apache mod_proxy and force connection over specific interface

Double question here ... Running on Debian Etch and Apache 2.0 1) Using mod_proxy and/or mod_proxy_http in apache 2.0. The basics of using mod_proxy are pretty simple so long as you're using a static config. I'm trying to figure out how to do it dynamically - that is, allow the entry of a... (4 Replies)
Discussion started by: Halfwalker
4 Replies

3. IP Networking

Apache mod_proxy +DNS slow response problem

My company has a private network, including a Apache web server (Linux) and some WinXP machines. The web server had been configured to use mod_proxy to connect to window update site via another company proxy server. It works for few years. Recently, some parties had setup a DNS server on the... (2 Replies)
Discussion started by: donaldfung
2 Replies

4. Red Hat

Problem in apache

Can anyone guide, what should be the entry in httpd.conf file to host a site in Redhat Ent Linux 5 without using nameserver? Or process to set apache server in same dist of Linux. Any link to understand apache well will be much appreciable. (3 Replies)
Discussion started by: naw_deepak
3 Replies

5. Debian

apache problem

hi all, I can't get my index.html to display on the web browser. Please point it out the reason. this is what i had done so far: 1. I have registered a dns name pointing to my public ip (it is done automatic) 2. my server name is set same as the dns name 3. I have configured... (14 Replies)
Discussion started by: k2k
14 Replies

6. Red Hat

mod_proxy: (70007)The timeout specified...

Hi to all member's forum. I have an httpd server with mod_proxy that forward any request to an another server. the flow is: client --> requesto proxy https://miosito.it --> forward to server https://192.168.0.10:8443/ I'm reading this error in my httpd log in LogLevel debug (after some... (0 Replies)
Discussion started by: lain
0 Replies

7. UNIX for Advanced & Expert Users

mod_proxy with ActiveX

Hi, I have a proxy with SSL that forward any request to a backend platform. In this moment I have a problem if I'm trying to execute an activex on the backend platform. I'm reading that the mod_proxy blocks any activex request because it don't trust for the system. How I can do? I'm reading... (0 Replies)
Discussion started by: lain
0 Replies

8. IP Networking

dns problem in apache

Hi, I am running scientific linux (which is clone of red hat linux) on virtual machine that is virtual box. I tried to start the apache but I got the following message. starting httpd: httpd: arp_sockaddr_info_get() failed for scientific-linux httpd: could not reliably determine the... (2 Replies)
Discussion started by: programAngel
2 Replies

9. Web Development

Httpd with mod_proxy redirect

Hi team, I was like unable to solve this interview question, Any help from them experts here please.. "Your supervisor requires that all web requests for "http://dev.example.net" be passed to "http://newdev.example.net". She states that upon redirect, the URL in the web browser must remain... (1 Reply)
Discussion started by: leo_ultra_leo
1 Replies

10. Web Development

Apache Mod_Proxy with failover

I have the following setup in my apache vhost: ProxyPass /abc http://www.newest.com/ ProxyPassReverse /abc http://www.newest.com/ I want to setup a failover approach in which if after a particular timeout say 10secs the load shifts to some other website like Refer.com | The world. The timeout... (0 Replies)
Discussion started by: ankur328
0 Replies
Session::Postgres(3)					User Contributed Perl Documentation				      Session::Postgres(3)

NAME
Apache::Session::Postgres - An implementation of Apache::Session SYNOPSIS
use Apache::Session::Postgres; #if you want Apache::Session to open new DB handles: tie %hash, 'Apache::Session::Postgres', $id, { DataSource => 'dbi:Pg:dbname=sessions', UserName => $db_user, Password => $db_pass, Commit => 1 }; #or, if your handles are already opened: tie %hash, 'Apache::Session::Postgres', $id, { Handle => $dbh, Commit => 1 }; DESCRIPTION
This module is an implementation of Apache::Session. It uses the Postgres backing store and no locking. See the example, and the documentation for Apache::Session::Store::Postgres for more details. USAGE
The special Apache::Session argument for this module is Commit. You MUST provide the Commit argument, which instructs this module to either commit the transaction when it is finished, or to simply do nothing. This feature is provided so that this module will not have adverse interactions with your local transaction policy, nor your local database handle caching policy. The argument is mandatory in order to make you think about this problem. AUTHOR
This module was written by Jeffrey William Baker <jwbaker@acm.org>. SEE ALSO
Apache::Session::File, Apache::Session::Flex, Apache::Session::DB_File, Apache::Session::Postgres, Apache::Session perl v5.12.1 2007-09-28 Session::Postgres(3)
All times are GMT -4. The time now is 06:39 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy