Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 237
  • Last Modified:

cache control

i have added following lines in httpd.conf

<FilesMatch "^t\.cgi$">
ExpiresActive on
ExpiresDefault A1
Header unset Cache-Control
Header set Cache-Control: "no-store, no-cache, must-revalidate"
Header unset Expires
Header set Expires "Thu, 01 Dec 1994 16:00:00 GMT"
</FilesMatch>


then i did   sudo /l/apache/bin/apachectl configtest    sudo /l/apache/bin/apachectl graceful

when i open the url   http://xyz.com/cgi-bin/t.cgi (i m printing headers in t.cgi)
i get the following output:

200 OK Date: Wed, 20 Apr 2005 16:08:13 GMT
Server: Web Server/1.3.28 (Unix) mod_ssl/2.8.15 OpenSSL/0.9.7c mod_gzip/1.3.26.1a mod_security/1.6 mod_jk/1.2.5 ApacheJServ/1.1.2
Cache-Control:
Expires:
Last-Modified: Sat, 16 Apr 2005 08:09:03 GMT
Etag: "f05478-98-4260c81f"
Content-Length: 152
Content-Type: text/html

why the Expires field is empty??????  it means it is still caching data
0
shahrahulb
Asked:
shahrahulb
  • 3
  • 2
1 Solution
 
shahrahulbAuthor Commented:
i have already tried this in httpd.conf file:

ExpiresActive on
<FilesMatch "^t\.cgi$">
ExpiresDefault A1
Header unset Cache-Control
Header set Cache-Control: "no-store, no-cache, must-revalidate"
Header unset Expires
Header set Expires "Thu, 01 Dec 1994 16:00:00 GMT"
</FilesMatch>

i also tried this:
ExpiresActive on
<Files "t\.cgi">
ExpiresDefault A1
Header unset Cache-Control
Header set Cache-Control: "no-store, no-cache, must-revalidate"
Header unset Expires
Header set Expires "Thu, 01 Dec 1994 16:00:00 GMT"
</Files>
0
 
ramazanyichCommented:
try to remove Header unset lines.

0
 
ramazanyichCommented:
also typo for Header set Cache-Control  - remove ":" sign
0
 
shahrahulbAuthor Commented:
tried both  still not working
0
 
shahrahulbAuthor Commented:
not sure if mod_expire is really enabled

when i do
sudo /l/apache/bin/httpd -l

i get

Compiled-in modules:
  http_core.c
  mod_so.c
suexec: disabled; invalid wrapper /l/apache-1.3.28-20031223/bin/suexec


i cannot see mod_expires.c

is this the way ot see????

however i can see Addmodule mod_expires.c in httpd.cof   also it is uncommented
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now