Web ページでドキュメントの年齢を確認したいのですが、表示されません。サーバーへの telnet の結果は次のとおりです。
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.
別のサーバーには、上記にない次の 2 行も含まれています。
Last-Modified: Fri, 17 Jun 2011 11:17:45 GMT
ETag: "2ce392-b1-4a5e688eae840"
だから私はインターネットを検索し、私が理解できる限り、Apacheにヘッダーを設定し、htaccessでetagを設定するための構成があるはずです。しかし、それを示す場所を見つけることができませんでした。
役立つ場合は、Apache にロードされたモジュールを次に示します。
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
私が読んだ限りでmod_header
は、有効にする必要があります。
これについて何か助けはありますか?
編集: 提案された解決策を試しました: ここにアップロードしないでくださいという名前のファイルがあっても、/ フォルダーに .htaccess ファイルを配置します。.htaccess の内容:
<code>
# Do not remove this line, otherwise mod_rewrite rules will stop working
RewriteBase /
Options -Indexes
SSILastModified on
<IfModule mod_expires.c>
FileETag MTime Size
ExpiresActive on
ExpiresDefault "access plus 10 days"
ExpiresByType application/javascript "access plus 1 week"
ExpiresByType application/x-javascript "access plus 1 week"
ExpiresByType application/x-shockwave-flash "access plus 1 week"
ExpiresByType text/css "access plus 1 week"
ExpiresByType image/jpg "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType image/x-icon "access plus 6 month"
ExpiresByType image/ico "access plus 6 month"
</IfModule>
</code>
このファイルを public_html フォルダーと、ファイル update.ver が存在するサブフォルダー nod_update3 に配置します。次に、次のようにドキュメントの年齢をチェックするスクリプトを実行します。 0,159 秒の応答時間で 26316 バイト |time=0,158965s;;;0,000000 size=26316B;;;0
ご覧のとおり、ftp クライアントでは最後に変更されたのは 25.10.2012 と表示されますが、変更日は表示されません。
次のように、同じフォルダー内の別のファイルをチェックしてみました: ./check_http -H av.hostoi.com -u /nod_update3/em000_32_l0.nup -M 2d HTTP CRITICAL: HTTP/1.1 200 OK - 最終更新日 13,5 日前 - 1,059 秒の応答時間で 56472 バイト |time=1,059014s;;;0,000000 size=56472B;;;0 srvmon plugins #
ご覧のとおり、日付の変更はわかっています。なぜverファイルに問題があるのですか?ファイルは次の URL で確認できます: http://av.hostoi.com/nod_update3//update.ver