Apache – SetEnvIf Request_URI

If you are using a LAMP platform having Apache httpd installed, you may have different logs for same website, for diverse paths, as the following example:
SetEnvIf Request_URI “^/mypath/xx” tipA
CustomLog /app/logs/www/access/mywebsiteX.log combined env=tipA
SetEnvIf Request_URI “^/mypath/yy” tipB
CustomLog /app/logs/www/access/mywebsiteY.log combined env=tipB

Leave a comment

Your email address will not be published.