What have been done?
Nginx has been configured and installed and has been setup in a way that minimises the changes to the Plesk setup.
The changes were limited to the following:
1. Updating the
Code: Select all
httpd.conf
2. Adding the
Code: Select all
rpaf.conf
Code: Select all
/etc/http/conf.d
3. Adding a line to the
Code: Select all
vhost.conf
Nginx was then configured to serve all requests for the site and to proxy any dynamic (PHP) requests to Apache.
Nginx now logs all the requests to the site's default log directory, created and maintained by Plesk.
What needs to be done?
For the integration to be seamless, I need Plesk to process the Nginx log files instead of the Apache log files.
Apache creates:
Code: Select all
/statistics/logs/access_log
/statistics/logs/error_log
Code: Select all
/statistics/logs/nginx_access_log
/statistics/logs/nginx_error_log
The one possible solution that I could come up with is for me to write a wrapper script, that would execute and:
1. Move
Code: Select all
nginx_access_log
Code: Select all
access_log
2. Merge
Code: Select all
error_log
Code: Select all
nginx_error_log
Code: Select all
logresolvemerge.pl
4. Apache would then start logging to the old
Code: Select all
nginx_access_log
Code: Select all
access_log
Code: Select all
error_log
The statistics script would then run like normal, like it always was, processing the following files:
Code: Select all
access_log
error_log
Where do you fit in?
I was hoping that you may have a bit more in-depth knowledge of the statistics script's inner workings.
Perhaps if I named the files in a certain way, statistics would pickup all the log files and process them?
Any input in this regard, to try and make the integration just that little bit more elegant, would be great.