Alias /matomo "/srv/www/matomo"

<Directory "/srv/www/matomo">
    AllowOverride All
    Options FollowSymLinks
    <IfModule mod_authz_core.c>
      # Apache 2.4
      Require all granted
    </IfModule>
    <IfModule !mod_authz_core.c>
      # Apache 2.2
      Order allow,deny
      Allow from all
    </IfModule>

    
    <IfModule mod_authz_core.c>
      # Apache 2.4
      
      <Files "*">
	   Require host 127.0.0.1
	    # Require ip 128.252.135.
	    # Require host mydomain.com
	    # Require host host.mydomain.com
      </Files>
      
      <Files ~ "^matomo\.(js|php)|^piwik\.(js|php)|robots\.txt$|index\.php$">
        Require all granted
      </Files>    

      <Files "archive.php">
	    Require all granted
      </Files>
      
    </IfModule>
    

    <IfModule !mod_authz_core.c>
      # Apache 2.2

      <Files "*">
	    Order deny, allow
        Deny from all
        Allow from 127.0.0.1
	    # Allow from 128.252.135.
	    # Allow from .mydomain.com
	    # Allow from host.mydomain.com
      </Files>

      <Files ~ "^matomo\.(js|php)|^piwik\.(js|php)|robots\.txt$|index\.php$">
	    Allow from all
	    Satisfy any
      </Files>    

      <Files "archive.php">
	    Order Allow,Deny
	    Allow from all
      </Files>
    
    </IfModule>

</Directory>