Logging and Troubleshooting

Module Logging
mod_perimeterx is capable of writing "Error" and "Debug" type of messages to Apache error log. To log module's messages to Apache error log you should set LogLevel directive to any value equal or lower than error level:

  • If mod_perimeterx's EnableDebugMode directive is enabled (On), then mod_perimeterx will log both "Error" and "Debug" type of messages.
  • If mod_perimeterx's EnableDebugMode directive is disabled (Off), then mod_perimeterx will log only "Error" messages.

Example: to see both "Error" and "Debug" mod_perimeterx messages in Apache error log:

# apache configuration
LogLevel error
<IfModule mod_perimeterx.c>
    ...
    EnableDebugMode On
    ...
</IfModule>

By default, EnableDebugMode directive is disabled (Off), and only "Error" messages are logged.

According to your apache configurations you should find in the error log mod_perimeters logs, for example:

[Sun Dec 17 09:44:13.799604 2017] [perimeterx:debug] [pid 9] mod_perimeterx.c(235): [PerimeterX - DEBUG][APP_ID] - Starting request verification
[Sun Dec 17 09:44:13.799788 2017] [perimeterx:debug] [pid 9] px_enforcer.c(264): [PerimeterX - DEBUG][APP_ID] - Cookie V3 found, Evaluating
[Sun Dec 17 09:44:13.799884 2017] [perimeterx:debug] [pid 9] mod_perimeterx.c(239): [PerimeterX - DEBUG][APP_ID] - Request context created successfully
[Sun Dec 17 09:44:13.799904 2017] [perimeterx:debug] [pid 9] px_enforcer.c(322): [PerimeterX - DEBUG][APP_ID] - No Captcha cookie present on the request
[Sun Dec 17 09:44:13.799922 2017] [perimeterx:debug] [pid 9] px_payload.c(237): [PerimeterX - DEBUG][APP_ID] - decode_payload: hmac for v3 is b224726ef08887b80b4a09ec3ef55a91536147d8b334fb3f0ae3c43f8dbc678a
[Sun Dec 17 09:44:13.802889 2017] [perimeterx:debug] [pid 9] px_payload.c(352): [PerimeterX - DEBUG][APP_ID] - Cookie evaluation ended successfully, risk score: 0
[Sun Dec 17 09:44:14.216108 2017] [perimeterx:debug] [pid 9] px_client.c(24): [APP_ID]: post_req_request: post request payload  {"type":"page_requested","socket_ip":"172.17.0.1","url":"localhost/","px_app_id":"APP_ID","details":{"block_score":0,"block_reason":"none","http_method":"GET","http_version":"1.1","module_version":"Apache Module v2.8.0-rc.9","px_cookie":"{\\"u\\":\\"d79b83b0-e30e-11e7-9fc6-6f721d4b631d\\",\\"v\\":\\"7f803340-9d42-11e7-83a5-8f78028be852\\",\\"t\\":1513504354651,\\"s\\":0,\\"a\\":\\"c\\"}","client_uuid":"d79b83b0-e30e-11e7-9fc6-6f721d4b631d","pass_reason":"cookie"},"headers":{"Host":"localhost:3000","Connection":"keep-alive","Pragma":"no-cache","Cache-Control":"no-cache","Upgrade-Insecure-Requests":"1","User-Agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.84 Safari/537.36","Accept":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8","Accept-Encoding":"gzip, deflate, br","Accept-Language":"en-US,en;q=0.9,he;q=0.8","Cookie":"PHPSESSID=h04pp2pbb7atjmrq9ovqc65hqp; _px=YNWJo4NKmRjcSl2lvohGq2KnAixUiBNbQq1AO9D6EkyS8trJ2dJye3oXk8EL53fl1BwW1zH3RJ+d/INP58k4ZQ==:1000:bS5VI9Y33XHl1hMw7X2IAdk83BNYh+VhpETz31+LxrA+xsc/bBkZGB9yAIlaaEZd3r/nujxmcADAvQgmsTrQuGwJGF7Nts85cEG/JnQ+CmoXCBNgLapIvkxYI7MowWDip6oiZ0LPR3JTkuqHdd7efHfG6Ex9Q4HEJ7g4pbIGB68/6mqbN6MkY+3coBtzBwv4iyoxpHPtyst61vA5HbTyw5d+VLEiBqKPezgBYI55F3dMpPDCcC/V+5N//HFWuUZ/oIN0LpzYlXFVK9LBympnvA==; _px3=b224726ef08887b80b4a09ec3ef55a91536147d8b334fb3f0ae3c43f8dbc678a:fhsk7nKkdV5lvBFWsIelUlpgVY44sa3e336YYrJ9T2MQvv5iJLcWYc3aZmICiIq8VqwFryK8BUWZMBDCZ+sdPQ==:1000:9bBom31EJqfEvSyqRHm44tI2OacekjgKioNcnVlBvjSDl/dbQzNXZdHSTZI5m0yIUyAT/kxMjOWdrpO/UR69gVE6ohuy+rR98ttMx/94MD2dHYKMevqN/D7pNNCFelL3s4nM41U88gyIN/ADf7ajwaNRk/XJ1zHFs9P4ipcaqKc="},"vid":"7f803340-9d42-11e7-83a5-8f78028be852"}

Did this page help you?