I have setup nginx as a proxy server to apache to serve static content. But, I would like the ngnix traffic to be included in each virtual server’s bandwidth monitoring. Is it possible to do this?
Okay, Jamie says that while there isn’t an officially supported manner of doing this – it may be possible to get it to work.
What you could do is try having Nginx write its logs to /var/log/virtualmin/${DOM}_access_log_nginx .
Virtualmin will include all log files that start with ${DOM}_access_log, in order to pick up rotated logs. And that can be used to include the logs from other webservers, such as Nginx, in the bandwidth statistics.
The issue though is that It might lead to double-counting, as a request to Nginx would be logged and then proxied to Apache, which would log it again…\