D
D
Dmitry Maksimenko2016-04-13 09:56:09
Apache HTTP Server
Dmitry Maksimenko, 2016-04-13 09:56:09

How to configure apache to send the Cache-Control header?

Greetings.
Help with Apache HTTP headers.
Connecting to 127.0.0.1:80... connection established.
HTTP request sent. Waiting for response...
HTTP/1.1 200 OK
Date: Wed, 13 Apr 2016 06:40:53 GMT
Server: Apache/2.2.22 (Debian)
Last-Modified: Wed, 13 Apr 2016 06:02:47 GMT
ETag: "e4e5-2dc-5305786e50fc0"
Accept-Ranges: bytes
Content-Length: 732
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: application/xml
Length: 732 [application/xml]
I need get apache to send the header Cache-Control: no-store, no-cache
I enabled mod_headers and mod_expires
and put .htaccess in the directory with the file on which I set wget

<IfModule mod_headers>
    Header set Cache-Control "no-store, no-cache, max-age=0"
</IfModule>
<IfModule mod_expires>
    ExpiresActive On
    ExpiresDefault "now"
</IfModule>

but as you can see, there is no Cache-Control header in the web server response

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question