Cannot debug the value of MM_COUNTRY_CODE variable from maxminddb module

202 views Asked by At

This is my apache version:

apache2# httpd -v
Server version: Apache/2.4.41 (Unix)
Server built:   Sep 12 2019 14:00:2

and this is my configuration:

ServerSignature Off
ServerTokens Prod

Header unset Server
Header unset Bobo-Exception-Type
Header unset Bobo-Exception-Value
Header unset Bobo-Exception-File
Header unset Bobo-Exception-Type
Header unset Bobo-Exception-Line

ExpiresActive On
ExpiresDefault "access plus 1 day"

Header set X-Content-Type-Options nosniff
Header set X-XSS-Protection "1; mode=block"
Header always set Content-Security-Policy "default-src https: data: 'unsafe-inline' 'unsafe-eval'; connect-src https: data:; frame-src http: data:; upgrade-insecure-requests"

<VirtualHost *:80>
  ServerAdmin ***@***
  ServerName ***.eu
  RewriteEngine On

  RewriteRule ^/(.*) http://plone:8080/VirtualHostBase/https/***.eu:443/mysite/VirtualHostRoot/$1 [P,L]
  Include /dev/null

  RewriteCond %{REQUEST_METHOD} ^(PUT|DELETE|PROPFIND|OPTIONS|TRACE|PROPFIND|PROPPATCH|MKCOL|COPY|MOVE|LOCK|UNLOCK)$
  RewriteRule .* - [F,L]

  ErrorLog /var/log/apache.log

    <Proxy "*">
        Require all granted
    </Proxy>
    SSLProxyEngine On

       MaxMindDBEnable On
       MaxMindDBFile COUNTRY_DB /usr/share/GeoIP/GeoLite2-Country.mmdb
       MaxMindDBEnv   MM_COUNTRY_CODE   COUNTRY_DB/country/iso_code
       #MaxMindDBEnv   MM_COUNTRY_CODE   HU

   <LocationMatch />
          #SetEnv TESTVAR HU
          #Header set countrytest %{TESTVAR}e
          Header set countrytest %{MM_COUNTRY_CODE}e
   </LocationMatch>
</VirtualHost>

I'm trying to debug the value of MM_COUNTRY_CODE variable with no success. I tried multiple ways and I receive (null) or simply the name of the variable. I also tried to put it in the logs (as here) and it didn't work.

Can you suggest me how to debug this variable, to get its value, please?

(The docs for geoblocking I follow.)

0

There are 0 answers