Skip to content

AWStats shows 1 visitor #3

@imorandinwnp

Description

@imorandinwnp

Hi,

AWStats shows 1 unique visitor when Nginx is installed in the server:

image

This is because AWStats expects this access log format:

181.230.235.117 - - [23/Feb/2023:11:54:59 -0300] "GET / HTTP/2.0" 200 21752 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36"

but Nginx logs this way ($server_name:$server_port at the beginning):

ranchounelen.com.ar:443 103.28.36.113 - - [23/Feb/2023:11:50:58 -0300] "POST /wp-login.php HTTP/1.1" 403 836 "-" "Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36"

I have to execute this every time Nginx updates to fix the problem (it just removes $server_name:$server_port from /etc/nginx/ea-nginx/global-logging.tt)

sed -i 's/$server_name:$server_port //g' /etc/nginx/ea-nginx/global-logging.tt
/scripts/ea-nginx conf --global >/dev/null 2>&1

Can you please change the log format to match AWStats needs?

Thanks in advance,

Ignacio

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions