---
title: "goaccess access.log analysis on a production environment"
date: "2025-02-05T23:48:32+00:00"
summary:
image:
type: "article"
url: "/acquia-cloud-platform/help/94611-goaccess-accesslog-analysis-production-environment"
id: "9eb0d989-2d53-4982-9dbe-3838bfcaed1b"
---

In this article we will be going over a quick example on how to use [goaccess](https://goaccess.io/) to analyze the Apache [access.log](/node/56388) in a production Acquia Cloud Platform environment.  
**Make sure to replace content in** `[]` **with your specific use case**

On ACE production environments there are two or more instances which means that we first need to copy the `access.logs` you would like to analyze on a shared location.

Create a folder named `goaccess-logs` in the shared location `/home/[example]/prod` :

    example@ded-123:~/prod$ mkdir goaccess-logs
    example@ded-123:~/prod$ cd ~/prod/goaccess-logs

Now copy the `access.logs` you would like to analyze and rename them for the first instance (you can narrow down your selection by replacing `[datestring]` for example, `access.log-2020*` will grab all available logs for 2020):

    example@ded-123:~/prod/goaccess-logs$ cp /var/log/sites/[example].[env]/logs/[ded-123]/access.log-[datestring]* ~/prod/goaccess-logs/
    example@ded-123:~/prod/goaccess-logs$ for f in access.log-[datestring]* ; do mv -- "$f" "$(hostname -a).$f" ; done

Repeat the above for all the production web instances you want to include in your analysis

Now you can use `goaccess`  to analyze the prod `access.logs` :

    example@ded-123:~/prod/goaccess-logs$ zcat [web-*/ded-*] | goaccess --log-format=COMBINED -o ~/report.html

The report is now available for you to download using the same methods described [here](/node/56379) but with the location being `/home/[example]/report.html` instead.

Note that you can actually place the `report.html` to a location which is served by your sites like `/var/www/html/example.env/docroot/sites/default/files` by modifying the above command and then view the result from your browser. **Be careful you may want to add http authentication to that as it will be publicly available!**