[Solved] How do I set up expire headers for images. js, and css?

Discussion in 'Install/Configuration' started by azn_romeo_4u, Jan 17, 2011.

  1. azn_romeo_4u

    azn_romeo_4u Member

    I have this is in the LST control panel under General > Expire Settings

    Enable Expires: Yes
    Expires Default: Blank
    Expires By Type: image/*=A604800, text/css=A604800, application/x-javascript=A604800

    When I use Yslow to check, it doesn't say that its expiring.
  2. webizen

    webizen New Member

    Are you using LiteSpeed with hosting control panel(like cPanel/WHM)? or configure everything(including server/vhosts, etc) in native LiteSpeed admin console?
  3. azn_romeo_4u

    azn_romeo_4u Member

    Using Cpanel/WHM and I have access to root server. But yea i'm not very familar with everything.

    I'm trying to set the images/css/js to expire in 30 days.
  4. webizen

    webizen New Member

    mod_expires for Apache needs to be configured/enabled in cPanel/WHM: since LSWS reads configuration from Apache (set by cPanel), mod_expires needs to be enabled in order for LSWS expires to work (http://www.litespeedtech.com/support/forum/showthread.php?t=4362).

    In lsws native configuration (not come from apache's httpd.conf), Expires header is enabled by default as you posted earlier:
  5. azn_romeo_4u

    azn_romeo_4u Member

    Thank you. Solved.

Share This Page