The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

how to enable If-Modified-Since header

Discussion in 'CloudLinux' started by arun123, Oct 10, 2011.

  1. arun123

    arun123 Registered

    Joined:
    Oct 10, 2011
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hello,

    Could anyone kindly explain how to enable "If-Modified-Since header" with apache. Checking the apache modules, i could see the necessary modules (mod_expires and mod_headers) is enabled by default.

    Apache version 2.21
    CloudLinux Server release 5.7

    I tried to add following lines to httpd.conf, but got error while restart saying it is builtin.
    LoadModule expires_module libexec/mod_expires.so
    LoadModule headers_module libexec/mod_headers.so

    So kindly someone tell me how to enable
    "If-Modified-Since header" or if it is enabled in default, how to check it
     
  2. jasonhk

    jasonhk Well-Known Member

    Joined:
    Nov 11, 2005
    Messages:
    48
    Likes Received:
    0
    Trophy Points:
    6
    You need to use EasyApache and enable the "Expires" module. Once that is done use .htaccess to activate.

    .htaccess (modified) example
    =====
    # enable expirations
    ExpiresActive On
    # expire GIF images after a month in the client's cache
    ExpiresByType image/gif A2592000
    # HTML documents are good for a week from the
    # time they were changed
    ExpiresByType text/html M604800
    =====

    Resources: mod_expires - Apache HTTP Server
     
Loading...

Share This Page