LocationMatch en el host virtual no funciona

LocationMatch en el host virtual no funciona

Necesito desactivar el caché para determinadas URL.

Comencé a usar estas directivas en el archivo .htaccess y funcionan:

<IfModule mod_headers.c>
    Header unset ETag
    Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"
    Header set Pragma "no-cache"
    Header set Expires "Wed, 11 Jan 1984 05:00:00 GMT"
</IfModule>

Estas directivas funcionan para cualquier URL del sitio web.
Como necesito que estas directivas funcionen solo para ciertas URL, las moví al archivo de host virtual, usando LocationMatchla directiva:

<VirtualHost *:80>
        DocumentRoot ...
        ServerName ...

        <Directory ...>
                Options Indexes FollowSymLinks
                Order allow,deny
                Allow from all
                AllowOverride All
        </Directory>

        <LocationMatch "/compile">
            Header unset ETag
            Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"
            Header set Pragma "no-cache"
            Header set Expires "Wed, 11 Jan 1984 05:00:00 GMT"
    </LocationMatch>
</VirtualHost>

Este código ya no funciona.

información relacionada