About the Device
Apache is a web server software that is responsible for accepting HTTP requests from visitors and sending them back the requested information in the form of web pages. The Apache http server provide a secure, efficient and extensible server that provides HTTP services in sync with the current HTTP standards.
Device Information
Entity | Particulars |
---|---|
Vendor Name | The Apache Software Foundation |
Product Name | Apache HTTP Server |
Type of Device | Hosted |
Collection Method
Log Type | Ingestion label | Preferred Logging Protocol - Format | Log collection method |
---|---|---|---|
Apache | APACHE | Syslog - Unstructured | CyberHub |
Port Requirements
Source | Destination | Port |
---|---|---|
The Apache Software Foundation Apache HTTP Server | CyberHub | 10014 (TCP) |
To facilitate secure communication and align with our best practice, we strongly encourage the use of Transport Layer Security (TLS) between your security devices and our Adaptive MxDR platform for event forwarding.
While we understand that TLS support may not be available on all devices, if your devices do support TLS communication, we recommend utilizing port 10014 for seamless integration.
In some cases, the upgraded version of the device might incorporate TLS support without prior notice. If you come across such a scenario or for further assistance in configuring TLS, we kindly ask you to reach out to your dedicated Adaptive MxDR Service Delivery Lead.
Device Configuration
Pre-requisite
Generate certificate on CyberHub using the following steps.
Go to support user mode by executing following command
su - support
on Cyberhub terminal and chooseoption 29 - Manage the TLS certificates
.Choose
option 2 - View EA Server TLS certificate
and this will print Private Key and Certificate content on console.Copy certificate from the console output to a file and save it.
Here you should copy and paste content from ----BEGIN CERTIFICATE----
to ----END CERTIFICATE----
.
Supported format for the Apache HTTP Server Access Logs:
Combined Log Format:
Defined in apache LogFormat by : %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\"
Only Combined Log Format is supported, no other log formats are supported.
Configuring Apache HTTP Server Access Logs on Windows and Linux
Windows:
By default, Apache is installed in C:\Apache24. If you are using a different directory, adjust the paths accordingly.
The main configuration file is typically located at C:\Apache24\conf\httpd.conf. Open httpd.conf in a text editor
Find the section in httpd.conf where logging is configured. It It should have below entry:
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\"" combined
Ensure you have a CustomLog directive pointing to your access log file. Add or modify the line to match the combined log format.
CustomLog "<Log Directory>/access.log" combined
Replace <Log Directory> with actual log file path/directory.
Save httpd.conf and close the text editor.
Open Command Prompt as an administrator and restart the Apache service
httpd -k restart
Linux:
By default and depending upon Linux distribution, Apache's configuration directory would be /etc/httpd or /etc/apache2. The main configuration file would be located at /etc/httpd/conf/httpd.conf or /etc/apache2/apache2.conf.
Based on linux distribution, open httpd.conf or apache2.conf using text editor
vi /etc/httpd/conf/httpd.conf
or
vi /etc/apache2/apache2.conf
Find the section in httpd.conf/apache2.conf where logging is configured. It should have below entry:
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\"" combined
Ensure you have a CustomLog directive pointing to your access log file. Add or modify the line to match the combined log format
CustomLog "<Log Directory>/access.log" combined
Replace <Log Directory> with actual log file path/directory.
Save the configuration file
wq!
Restart the Apache service to apply the changes based on linux distribution.
systemctl restart httpd
or
systemctl restart apache2
To configure NxLog Agent for Apache Logs on port 10014 (Windows)
Download and install the NXLog Windows agent from the following location: https://nxlog.co/products/nxlog-community-edition/download.
Navigate to
services.msc
and stop the nxlog service.Go to the folder
C:\Program Files\nxlog\data
and delete the fileconfigcache.dat
if it present.Rename the attached file to
and copy intoC:\Program Files\nxlog\conf.
folder.Replace the placeholder
CyberHub IP
with the actual CyberHub IP in the nxlog.conf file.Copy the previously created certificate file on Windows machine where nxlog agent is installed and mentioned this cert path in nxlog.conf against "CAFile" on line number 47.
Start the NxLog service from services.msc.
NXLog agent logs will be available at the location
C:\Program Files\nxlog\data\nxlog.log
.The log flow should work, and you can check it using tcpdump with the command
tcpdump -AA port 10014
To configure NxLog Agent for Apache Logs on port 10014 (Linux)
Download and install the NXLog Linux agent from the following location: https://nxlog.co/products/nxlog-community-edition/download.
Stop NxLog service.
Rename the attached
file tonxlog.conf
and copy into/etc/
folder.Replace the placeholder
CyberHub IP
with the actual CyberHub IP in the nxlog.conf file.Copy the previously created certificate file on Linux machine where nxlog agent is installed and mentioned this cert path in “nxlog.conf” against "CAFile" on line number 39.
Start the NxLog service
NxLog agent logs will be available at location "/var/log/nxlog.log".
The log flow should work, and you can check it using tcpdump with the command
tcpdump -AA port 10014
Integration Parameters
Parameters required from customer for Integration.
Property | Default Value | Description |
---|---|---|
IP Address | The Apache Software Foundation Apache HTTP Server interface IP address | Hostname or IP address of the device which forwards logs to the CyberHub |