Native support for Cloudflare is not in our roadmap.
It would need changes in the log structure to make it work, which will not work for non-CF users. Also, I'm not a fan of having conf files loading on each request for users that don't need it.
The proper solution would be:
Another option: You can add your own custom NGINX rules for each site (inside server block).
Ok, cool, how to best go about making that native implementation? How do I give you the files/code and where would I need to put it so it can be executed with sudo site example.com -wp -cf?
And a side note, the competition all have it natively in the nginx.conf or somewhere in conf.d. Because a lot of site run behind Cloudflare, it is more the norm and less the fringe case nowadays, but of course if you want it as a plugin, then that's how it shall be.
The easiest way and recommended:
As I mentioned in a previous comment, the Webinoly Internal API is very well documented and that's an easy way to integrate your own code into Webinoly.
Try this code and see what happens whene you run: sudo site example.com -wp -cf
[[ $1 == "si2" && -n $cf ]] && echo "Cloudflare Code!"
To Include the original visitor IP in your logs, add the variables $http_cf_connecting_ip and $http_x_forwarded_for in the log_format directive.
And sorry, Micha, it's not a matter of "code contribution", Cloudflare is not in our roadmap. Maybe in the future we can change this idea!
Not a problem, I can just add it in a Webinoly install script. And I don't care much for access logs anyway, I leave them off, as is the default for Webinoly.Just thought it would be beneficial for a large chunk of Webinoly users. You don't think that?So if it ever get's implemented, I guess it should look like this:
webinoly -cf=onwebinoly -cf=off
What it would do is simple: Add the .conf-file that gets generated into /etc/nginx/conf.d/ and use sed to put/remove that necessary $http_cf_connecting_ip in the log_format line in nginx.conf.It will not be necessary to limit that configuration to one specific site as chances are very very high that you use Cloudflare when you use it on one site on all. And even if there is one that does not, the config would no get in the way anyways.
PayPal · GitHub Sponsors · Bitcoin