I would like to check the age of the document in the webpage but it does not show! here is the result of a telnet to the server:
telnet av.hostoi.com 80 Connected to av.hostoi.com. HEAD / HTTP/1.0 HTTP/1.1 200 OK Date: Tue, 23 Oct 2012 16:55:40 GMT Server: Apache X-Powered-By: PHP/5.2.17 Connection: close Content-Type: text/html Connection closed by foreign host.
on another server the following 2 lines are also included which are not present above:
Last-Modified: Fri, 17 Jun 2011 11:17:45 GMT ETag: "2ce392-b1-4a5e688eae840"
So I searched the internet and as far as I could figure out there should be a configuration in apache to set headers on and etag on in htaccess? but I couldn't find any place that shows that.
Here are the loaded modules in apache if it would help:
core mod_authn_file mod_authn_default mod_authz_host mod_authz_groupfile mod_authz_user mod_authz_default mod_auth_basic mod_include mod_filter mod_log_config mod_env mod_expires mod_headers mod_setenvif mod_version prefork http_core mod_mime mod_status mod_autoindex mod_asis mod_info mod_vhost_alias mod_negotiation mod_dir mod_actions mod_alias mod_rewrite mod_so mod_php5 mod_ruid2
As far as I read mod_header must be enabled which seems to be the case?
edit: tried the proposed solution: put a .htaccess file in / folder even though there is a file named do not upload here. contents of .htaccess:
i put this file in public_html folder and in the sub folder nod_update3 where the file update.ver exists. then i execute the script that checks the age of the document like so:
./check_http -H av.hostoi.com -u /nod_update3/update.ver -M 2d HTTP CRITICAL: HTTP/1.1 200 OK - Document modification date unknown - 26316 bytes in 0,159 second response time |time=0,158965s;;;0,000000 size=26316B;;;0
as you can see no modification date is shown even though on the ftp client it shows it was last modified 25.10.2012
i tried the check on another file in the same folder like so:
./check_http -H av.hostoi.com -u /nod_update3/em000_32_l0.nup -M 2d HTTP CRITICAL: HTTP/1.1 200 OK - Last modified 13,5 days ago - 56472 bytes in 1,059 second response time |time=1,059014s;;;0,000000 size=56472B;;;0 srvmon plugins #
as you can see the date modification is known. so why the problem with ver file? the file can be checked in this url: http://av.hostoi.com/nod_update3//update.ver