To integrate Nginx seamlessly on a server running Plesk 8.3 or laterWhat 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
file to listen on only certain IP addresses.
2. Adding the
to enable mod_rpaf.
3. Adding a line to the
file of the affected site.
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.
Plesk processes all the log files by running the statistics
) script once a day.
The one possible solution that I could come up with is for me to write a wrapper script, that would execute and:
(ie. replace it)
3. Reload Nginx and Apache to force them to open new log files.
4. Apache would then start logging to the old
) and the merged
5. The final step would be to call statistics
script would then run like normal, like it always was, processing the following files:
The above process, should allow Plesk to continue reporting on the all the normal traffic accounting.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.