This document shows how to log incoming web requests and their IPs using the embedded Apache Tomcat configuration files.
Denodo Virtual DataPort has an embedded Apache Tomcat server that is used for the web administration tools and also to deploy published web services. In some cases it will be very useful to store in the logs the accessed URLs.
The way to enable the logging for incoming http requests is different for different versions of the Denodo Platform.
For Denodo Platform 5.5 and earlier versions open
and change the property
which by default is set to false to true.
For Denodo Platform 6.0 the file to modify will be
In this file, uncomment the following section that is commented by default:
For Denodo Platform 7.0 and 8.0 the file to modify will be
<SOLUTION_MANAGER_HOME>/resources/apache-tomcat/conf/server.xml (for the Denodo Solution Manager)
<DENODO_HOME>/resources/apache-tomcat/conf/server.xml (for the Denodo Platform).
In these files, uncomment the following section that is commented by default:
Once the configuration change is performed, for all Denodo versions, restart the Denodo Platform services.
Once the logging is enabled after executing a request against one of the web services hosted on the Denodo Platform, a log file will be created under
<DENODO_HOME>/logs/apache-tomcat called http_access.<DATE>.log
In the file, a new line for each request with the following pattern will be appended:
<IP> - - <DATE> <HTTP Method> <URL Requested> <HTTP Code> <Size>
For example, after browsing to http://<DENODO_HOST>:<PORT>/denodo-restfulws/tutorial, something similar to the following line will be added to the log file:
127.0.0.1 - - [02/Mar/2016:08:44:48 +0100] "GET /denodo-restfulws/tutorial HTTP/1.1" 200 4360