You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

get overview of web sites access from nginx logs. both in linux console and as a web page

https://goaccess.io/download#distro


goaccess /var/log/nginx/access.log --log-format=VCOMBINED
/etc/nginx/nginx.conf
    log_format vcombined '$host:$server_port '
        '$remote_addr - $remote_user [$time_local] '
        '"$request" $status $body_bytes_sent '
        '"$http_referer" "$http_user_agent"';

    access_log  /var/log/nginx/access.log vcombined;

nginx static page

crontab -e
* * * * * goaccess /var/log/nginx/access.log --log-format=VCOMBINED -a -o /var/www/html/index.html
vi /etc/nginx/sites-available/stat.conf
server {
        listen       80;
        server_name goaccess.example.com;
        root /var/www/html/;
        location / {
                index index.html;
        }
}



  • No labels