<IfDefine HAVE_ASN> <IfModule !mod_asn.c> LoadModule asn_module modules/mod_asn.so </IfModule> </IfDefine> <IfModule mod_asn.c> # ASLookup - Set to On or Off to enable or disable AS number lookups # ASLookupDebug - Set to On or Off to enable or disable debug logging to # error log # ASSetHeaders - Set to On or Off to enable or disable adding the lookup # result to the response headers # ASLookupQuery - the SQL query string to use # ASIPHeader - Take the IP address from this HTTP request header, instead # of the IP address that the request originates from # ASIPEnvvar - Use this string to look up the IP address in the subprocess # environment, instead of using the IP address that the request originates # from # These configuration directives are per directory. #<Directory /srv/www/download> # AS number lookups will be done for requests inside this directory. #ASLookup On # Note: debugging can be enabled for specific subdirectories for # testing, which is good on a busy server, because it is very extensive. #ASLookupDebug Off # Add the prefix and AS number to the response headers like this: # X-Prefix: 83.133.0.0/16 # X-AS: 13237 #ASSetHeaders On #</Directory> # SQL statement to be prepared. (Optional.) # # This configuration is per server, as the database (dbd) configuration. #ASLookupQuery "SELECT pfx, asn FROM pfx2asn WHERE pfx >>= ip4r(%s) ORDER BY ip4r_size(pfx) LIMIT 1" </IfModule>