There is a nice R module for apache: rApache. So you can easily publish statistics.
To install rApache first install the following packages from the Debian/Ubuntu repository:
So the basics are done. Lets install rApache. Grab the latest version:
extract the contents and cd into it. The installation process should be clear, I had to give a hint for the apxs2 location:
To notify apache about the new module you need to create two more files. First one is /etc/apache2/mods-available/r.conf :
Now all files in /R are assumed to be R-scripts, in /RApacheInfo you’ll find some information about your installation.
The second file is /etc/apache2/mods-available/r.load :
This file just defines which lib to load.
To finish the installation you need to load the rApache module and restart the webserver via:
That’s it. You can test whether all was successful by browsing to localhost/RApacheInfo, hopefully you’ll see some config stuff. To prepare some own tests create a directory /var/www/R (assuming your document-root is /var/www ) and paste something like this in a file called test :