httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Kew <n...@webthing.com>
Subject Re: [users@httpd] How to configure Apache 2 to compress xml files on serving?
Date Fri, 13 Jun 2008 22:53:13 GMT
On Fri, 13 Jun 2008 19:17:32 +0200
Bo Berglund <bo.berglund@telia.com> wrote:

> I need to set up a test environment where I am running Apache locally
> with a number of xml data files as objects to serve.
> I am doing this to simulate a live server tha I don't want to disturb
> for my testing. The live server responds to requests for file URL:s
> like: http://server/dir/file.xml.gz by sending a gzipped data stream
> that FireFox discovers is compressed and expands it into the browse
> window so that the file.xml contents is shown.

The above is hopelessly at odds with your configuration:

> <Directory "C:/Engineering/Projects/XMLTV/Testsite">
>     Options Indexes MultiViews Includes
>     AllowOverride None
>     Order allow,deny
>     Allow from all
>     AddType text/html .shtml
>     AddType application/x-httpd-php .php

That's been wrong since 1996.  Use AddHandler.

>     AddOutputFilter INCLUDES .shtml 

That won't work on a compressed file unless you decompress
it (with mod_deflate) first.

Neither will any of the above do anything to a file.xml.gz.

If you don't already have them, you probably want
	AddType text/xml .xml
(or other XML type)
	AddEncoding gzip .gz

> </Directory>

-- 
Nick Kew

Application Development with Apache - the Apache Modules Book
http://www.apachetutor.org/

---------------------------------------------------------------------
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@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message