Welcome! Log In Create A New Profile

Advanced

nginx + goaccess

May 13, 2017 05:21AM
Добрый день.

Дано: web server apache, reverse proxy nginx + парсер логов goaccess
В последней версии goaccess утилиту можно запустить с ключом --real-time-html и получить красивую вэбморду с парсингом логов в реальном времени (пример: http://rt.goaccess.io/)
Утилита goaccess по умолчанию слушает 7890 порт.

данные с сервера:

iptables -L -n -v | grep 7890
1 60 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:7890

запускается goaccess следующей командой

goaccess /var/log/apache2/domains/123.com.log -o /home/admin/web/stat.123.com/public_html/index.html --real-time-html --ws-url=stat.123.com

конфиг nginx

server {
listen 99.99.99.99:80;
server_name stat.123.com s.123.com;
error_log /var/log/apache2/domains/stat.123.com.error.log error;

location / {
proxy_pass http://99.99.99.99:8080;
location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|tif|tiff|css|js|htm|html|ttf|otf|webp|woff|txt|csv|rtf|doc|docx|xls|xlsx|p$
root /home/admin/web/stat.alexeymirnoff.com/public_html;
access_log /var/log/apache2/domains/stat.123.com.log combined;
access_log /var/log/apache2/domains/stat.123.com.bytes bytes;
expires max;
try_files $uri @fallback;
}
}

location /error/ {
alias /home/admin/web/stat.123.com/document_errors/;
}

location @fallback {
proxy_pass http://99.99.99.99:8080;
}

При текущей конфигурации goaccess генерит статический index.html, а хотелось бы чтобы это было Real Time.
Вопрос: Какие настройки должны быть у nginx чтобы на сервере по адресу: http://stat.123.com/ показывалась статистика goaccess?
Subject Author Posted

nginx + goaccess

Sfalimov May 13, 2017 05:21AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 307
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready