I just installed this mod on Ubuntu 6.10, but I have to assume some of the mods below are also essential for other deployments
I've found the following problems with this install on Ubuntu 6.10 (Edge Eft) and Apache2.
In the
install.sh script, which is found in the installation directory
~/ispc.awstats-install:
- The quotes around the the variables are not needed and escaping is done too much, so the variables are not set. Change the lines reading:
Code:
HTTPPATH="`httpd -V |grep HTTPD_ROOT | cut -f 2 -d \\"`"
CONFFILE="`httpd -V |grep SERVER_CONFIG_FILE | cut -f 2 -d \\"`"
to
Code:
HTTPPATH=`httpd -V |grep HTTPD_ROOT | cut -f 2 -d \"`
CONFFILE=`httpd -V |grep SERVER_CONFIG_FILE | cut -f 2 -d \"`
- Next in the same install.sh script, the wrong variable names are used for updating the apache configuration, thus it's never updated. You also need to restart apache to make the changes effective.
Change:
Code:
.......
elif [ -f "$SERVER_CONFIG_FILE" ]; then
echo " Found: full path conf file"
cat "$SERVER_CONFIG_FILE" >/tmp/httpd.conf.$$ && \
cat /home/admispconfig/ispconfig/web/ispc.awstats/httpd.patch >> /tmp/httpd.conf.$$ && \
mv "$SERVER_CONFIG_FILE" "$SERVER_CONFIG_FILE.$$" && \
mv /tmp/httpd.conf.$$ "$SERVER_CONFIG_FILE"
[ "$?" != 0 ] && ( echo "ERROR: failed to copy httpd configuration"; exit 1 )
elif [ -f "$HTTPPATH/$SERVER_CONFIG_FILE" ]; then
echo " Found: httpd+conf full path conf file"
cat "$HTTPPATH/$SERVER_CONFIG_FILE" >/tmp/httpd.conf.$$ && \
cat /home/admispconfig/ispconfig/web/ispc.awstats/httpd.patch >> /tmp/httpd.conf.$$ && \
mv "$HTTPPATH/$SERVER_CONFIG_FILE"
"$HTTPPATH/$SERVER_CONFIG_FILE.$$" && \
mv /tmp/httpd.conf.$$ "$HTTPPATH/$SERVER_CONFIG_FILE"
[ "$?" != 0 ] && ( echo "ERROR: failed to copy httpd configuration"; exit 1 )
fi
to
Code:
.......
elif [ -f "$CONFFILE" ]; then
echo " Found: full path conf file"
cat "$CONFFILE" >/tmp/httpd.conf.$$ && \
cat /home/admispconfig/ispconfig/web/ispc.awstats/httpd.patch >> /tmp/httpd.conf.$$ && \
mv "$CONFFILE" "$CONFFILE.$$" && \
mv /tmp/httpd.conf.$$ "$CONFFILE"
[ "$?" != 0 ] && ( echo "ERROR: failed to copy httpd configuration"; exit 1 )
elif [ -f "$HTTPPATH/$CONFFILE" ]; then
echo " Found: httpd+conf full path conf file"
cat "$HTTPPATH/$CONFFILE" >/tmp/httpd.conf.$$ && \
cat /home/admispconfig/ispconfig/web/ispc.awstats/httpd.patch >> /tmp/httpd.conf.$$ && \
mv "$HTTPPATH/$CONFFILE" "$HTTPPATH/$CONFFILE.$$" && \
mv /tmp/httpd.conf.$$ "$HTTPPATH/$CONFFILE"
[ "$?" != 0 ] && ( echo "ERROR: failed to copy httpd configuration"; exit 1 )
fi
And restart apache with
Code:
/etc/init.d/apache2 force-reload
- The cron script also contains an error by referencing the wrong alias. So Update line 103 of /root/ispconfig/scripts/shell/awstats.php from
Code:
fwrite($fp, "\nRedirect 301 /stats http://".$web_real_name."/ispc.awstats/awstats.pl?config=".$web_real_name."\n");
to
Code:
fwrite($fp, "\nRedirect 301 /stats http://".$web_real_name."/ispcstats/awstats.pl?config=".$web_real_name."\n");
Happy AWStats

statistics by accessing <siteURL>/stats.