I want to build a reverse-proxy setup for static files using Apache and Nginx. I want to use it for Plesk. Normally, Plesk gets the bandwidth information from the Apache logs. Is it possible to calculate the used bandwidth with a reverse-proxy setup?

link|improve this question
feedback

1 Answer

up vote 0 down vote accepted

Well, i think the best way is creating nginx logs with the same log_format in the same file location per virtual host and disable apache access log per virtual host (or store it to another file. I believe it can be set by editing vhost.conf file).

More simply - you can make some wrapper script, which would be move standart apache access_log file for example to access_log.1 and nginx_access_log file to access_log before plesk statistics script execution.

Base idea - nginx already have all traffic information and this information must be stored in default location (vhosts access_log) by the same log format.

link|improve this answer
That's what I call a practical solution! Thank you very much. – Davey Nov 2 '11 at 21:24
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.