Header directive in Location

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello

I would like to use "Header set " directive within Location directive.
But it doesn't work.
Example.
  <Location /home/iida/apache-2.4.43/htdocs>
      Header set Pragma no-cache
      Header set Cache-Control no-cache
  </Location>

But in Filematch or Directory directive,  "Header set" works.

  <FilesMatch "\.(html|htm)$">
    Header set Pragma no-cache
    Header set Cache-Control no-cache
  </FilesMatch>

As I read online manual,
https://httpd.apache.org/docs/current/en/mod/mod_headers.html
> Header
> Context:server config, virtual host, _directory_, .htaccess

> directory   A directive marked as being valid in this context may be
> used inside <Directory>, <Location>, <Files>, <If>, and <Proxy>
> containers in the server configuration files, subject to the
> restrictions outlined in Configuration Sections.

This document tells that I can use Header directive in "Location".

FYI, I have tested this on apache-2.4.43.

Masanari Iida

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx




[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux