LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > General > [solved] htaccess and gzip

Reply
 
Thread Tools Display Modes
  #1  
Old 11-01-2012, 04:25 PM
mrxUx mrxUx is offline
Member
 
Join Date: Jul 2012
Posts: 23
Default [solved] htaccess and gzip

Hello there, I've a question about how compression works with LSWS, I have it activated and dynamic too, however it looks like it is only compressing php files and nothing else.

For example if I try to go to http://mysite.com/page.php I'll see the header Content-Encoding gzip , gut if I reach the file http://mysite.com/style.css the header doesn't even appear and of course is not being compressed.

Is this how it works? do LSWS only compress elements that are being called by a PHP?

On the compression types I have: text/*

Also I have tried to tweak .htaccess without success

Code:
<FilesMatch "(\.html\.gz|\.css\.gz)$">
Header set Content-Encoding "gzip"
</FilesMatch>
Anyone can bring some light or smack me?

Last edited by NiteWave; 11-06-2012 at 07:18 PM..
Reply With Quote
  #2  
Old 11-01-2012, 07:28 PM
NiteWave NiteWave is offline
LiteSpeed Staff
 
Join Date: Sep 2009
Posts: 2,226
gzip settings at
lsws admin console->Server->Tuning->GZIP Compression

for example, there is an option:
Min Static File Size (bytes):default is 300

mean if file size of .css etc less than 300 bytes, then no gzip.
Reply With Quote
  #3  
Old 11-05-2012, 10:32 AM
mrxUx mrxUx is offline
Member
 
Join Date: Jul 2012
Posts: 23
Quote:
Originally Posted by NiteWave View Post
gzip settings at
lsws admin console->Server->Tuning->GZIP Compression

for example, there is an option:
Min Static File Size (bytes):default is 300

mean if file size of .css etc less than 300 bytes, then no gzip.
Oh I was aware of that the style I'm trying to reach is about 88K so it should be compressed, the min and max values are 300B / 1M so I'm still unsure what could be this issue, thanks for the quick response NiteWave.
Reply With Quote
  #4  
Old 11-05-2012, 06:02 PM
NiteWave NiteWave is offline
LiteSpeed Staff
 
Join Date: Sep 2009
Posts: 2,226
by default, .css/.js is compressed, you needn't configure anything.
you can check this support forum with firebug, it's running litespeed.
Reply With Quote
  #5  
Old 11-06-2012, 08:47 AM
mrxUx mrxUx is offline
Member
 
Join Date: Jul 2012
Posts: 23
@NiteWave: Yeah I've done that test too and it is not being gzipped, I can PM you the URL if you want to confirm thanks.
Reply With Quote
  #6  
Old 11-06-2012, 01:53 PM
webizen webizen is offline
LiteSpeed Staff
 
Join Date: Oct 2010
Posts: 2,339
Post your settings for
Quote:
Auto Update Static
Static GZIP Cache Directory
If Auto Update Static is set to Yes, check Static GZIP Cache Directory (default to swap directory /tmp/lshttpd/swap if Static GZIP Cache Directory field is empty) and make sure it is writeable by web server user _and_ it is not full.

Last edited by webizen; 11-06-2012 at 02:13 PM..
Reply With Quote
  #7  
Old 11-06-2012, 02:01 PM
mrxUx mrxUx is offline
Member
 
Join Date: Jul 2012
Posts: 23
@webizen: thanks, it is not activated
Reply With Quote
  #8  
Old 11-06-2012, 02:18 PM
webizen webizen is offline
LiteSpeed Staff
 
Join Date: Oct 2010
Posts: 2,339
Quote:
Originally Posted by mrxUx View Post
@webizen: thanks, it is not activated
try

Auto Update Static => Yes
Reply With Quote
  #9  
Old 11-06-2012, 04:36 PM
mrxUx mrxUx is offline
Member
 
Join Date: Jul 2012
Posts: 23
Oh my bad, Auto update static was activated and it is saving now on the Swap directory, I got a little confused about the static gzip cache directory which is pretty much by default swap dir unless specified.

Thanks for your help guys, you really rock
Reply With Quote
Reply

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 09:45 AM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.