LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-24-2008, 12:55 PM   #1
matsko
Member
 
Registered: Dec 2005
Posts: 51

Rep: Reputation: Disabled
Apache Configure Pre-Gzipped Content


Hello.

In order to reduce bandwidth usage, I am planning to serve compressed gzip content then that of standard text. The only difference is that instead of compressing the content when its about to be delivered with mod_deflate, I want the content to be compressed (only once) manually.

So this methodology of pre compressing the content is only for static data (such as css, js and plain html files).

I started off by gzipping the file that I want to be compressed.

% gzip common.css
# => common.css.gz

I tried delivering the content with a .gz extension and a made apache recognize files with that extension to served as gzip files. The problem that I'm having now is that when the file is accessed via http, the request is given as an archive (so the gzip file isn't extracted and parsed by the browser).

How can I setup apache to deliver the file as a gzip encoded file that will be read and understood by the end browser?
 
Old 02-25-2008, 07:24 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3591Reputation: 3591Reputation: 3591Reputation: 3591Reputation: 3591Reputation: 3591Reputation: 3591Reputation: 3591Reputation: 3591Reputation: 3591Reputation: 3591
Apache serves content based on file content, it links the "magic" with the right handler, mime type. Compressing it that way doesn't make sense and any "solution" changing that is impractical and results in breakage. If for some obscure reason you don't want to deal with mod_deflate overhead maybe wedge a proxy in front of your httpd?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache 2.2 & Content Switches ThisGuyIKnow Linux - Software 3 03-12-2007 01:15 PM
directory content on apache spank Linux - Newbie 1 09-23-2005 02:40 PM
Problems Accesing Content on Apache brokenflea Slackware 2 08-05-2004 01:59 AM
Apache serving content after the content is removed? jrbush82 Linux - Software 6 05-05-2004 04:39 AM
My Apache server is not refreshing content??? rosko Linux - Software 46 12-18-2002 10:26 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:00 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration