Static Files Not Compressing

Discussion in 'Install/Configuration' started by artagesw, Jun 12, 2007.

  1. artagesw

    artagesw New Member

    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
    Last edited: Jun 12, 2007
  2. mistwang

    mistwang LiteSpeed Staff

    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
  3. artagesw

    artagesw New Member

    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?
  4. mistwang

    mistwang LiteSpeed Staff

    If set to "No", LiteSpeed will not try to compress static file by itself, the compressed file need to be created manually.

    That should be enough, please double check the permission of parent directories.
  5. artagesw

    artagesw New Member

    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!

Share This Page