PDA

View Full Version : Static Files Not Compressing


artagesw
06-11-2007, 10:17 PM
I can't get LiteSpeed to compress my static files. It is compressing dynamic files, but not .js or .css files.

My GZIP Compression Settings are:

Enable Compression Yes
Enable Dynamic Compression Yes
Compression Level (Dynamic Content) 6
Compressible Types text/*, application/x-javascript, application/xml
Auto Update Static No
Compression Level (Static File) 6
Max Static File Size (bytes) 1M
Min Static File Size (bytes) 300

(I disabled Auto Update Static because it was not working either. And yes, the static file directories are all writable by the web server process.)

Any idea how I can get LiteSpeed to compress css and javascript files?

Edit: running LiteSpeed 3.1.1 Standard Edition

mistwang
06-12-2007, 09:25 AM
Auto update static should be yes, only thing could goes wrong is the permission. try create a file in the static file directories as the user that lshttpd run as.
If the static file does not change often, you can manually construct the compression cache by using lsws/admin/mics/gzipStatic.sh

artagesw
06-12-2007, 09:37 AM
I thought "Auto Update Static" is optional and if it is set to "No" then LiteSpeed will recompress the static file on-the-fly each time it is requested. Is that incorrect?

Also, is it not enough to allow the **group** that LiteSpeed runs under to have write access to the directories? Or does it have to be the user?

mistwang
06-12-2007, 09:50 AM
I thought "Auto Update Static" is optional and if it is set to "No" then LiteSpeed will recompress the static file on-the-fly each time it is requested. Is that incorrect?
If set to "No", LiteSpeed will not try to compress static file by itself, the compressed file need to be created manually.

Also, is it not enough to allow the **group** that LiteSpeed runs under to have write access to the directories? Or does it have to be the user?
That should be enough, please double check the permission of parent directories.

artagesw
06-12-2007, 10:14 AM
OK, I set "Auto Update Static" back to "Yes' and now it is working. I don't know why it wasn't working before... Thanks!