Awstats on nginx
Hi, I'm using ISPConfig with nginx on Ubuntu 11.10. When I configure a site and set awstats for statistics, the nginx plugin fails to setup the statistics page. Looking in /var/log/ispconfig/cron I see this error:
copy(/var/www/clients/client1/web1/web/stats/index.php): failed to open stream: No such file or directory in /usr/local/ispconfig/server/plugins-available/nginx_plugin.inc.php on line 1369
Looking at the plugin code I see that before the copy there should be a test if the target directory exists.
Porposed code (add at row 1369):
if(!is_dir(data['new']['document_root']."/web/stats/")) mkdir(
data['new']['document_root']."/web/stats");