PDA

View Full Version : Using AWStats without shell access?


kprevas
08-20-2006, 03:52 PM
Is it possible to set up AWStats on a Minimalist (no shell access) account? The tutorial on the wiki assumes shell access.

dkozinn
08-22-2006, 11:35 AM
I'm surprised nobody else jumped in, so let me give it a shot: What you should be able to do is to do the downloads, uncompress/untar locally (if you're using a Linux-ish box locally that's obviously no trouble, if you're using something else there are tools available that will do this), do the editing on your local machine, then just upload all the stuff to the proper directories. The only thing that I'm not sure of off the top of my head is how you'd do the symlink (you might be able to do this with your FTP client, but I'm not really sure.) If you can't do that, you could just have everything else set up and file a trouble ticket to ask Matt to do that for you.

Good luck!

kprevas
08-22-2006, 02:07 PM
Right, I've gotten that far, but I definitely can't create the symlink via FTP. I'm also not sure how I'd actually run the stats generation since I can't invoke the command nor set up a cron job.

dkozinn
08-22-2006, 02:42 PM
Right, I've gotten that far, but I definitely can't create the symlink via FTP. Apparently, some FTP servers will allow you to issue a command directly to the server, though I don't know if the one on here will. If that's the only remaining piece, then I'd definitely file a trouble ticket and ask for them to make the link for you.

I'm also not sure how I'd actually run the stats generation since I can't invoke the command nor set up a cron job. There are a couple of possibilities: I think that the Minimalist normally doesn't have cron enabled, but perhaps they'll grant an exception. If they do, then you'd just access your cron jobs through Esprit. As an alternative, you can enable a feature in Awstats that will allow generation of the stats in "real-time". The use of this features is not enouraged, because it eats CPU time, but it might be an alternative for you if you have no other choice. You'll need to peek at the configuration file for which specific setting to change, but as I recall it's not difficult. I would strongly suggest that if you do that, you password-protect the directory that awstats runs from (for instance, make a subdomain called stats.yourdomain.com, have it created at someplace like /var/www/stats, and use Espirt to put userid/password security on it). You'll want to do this to keep random folks from running stats collection routines constantly.

One totally different alternative is to use Google Analytics. (http://google.com/analytics) Last I checked they were still giving out accounts for free. There is some really amazing stuff that it'll do, the only tradeoff is that you need to put in a little bit of javascript on each page you want tracked.

Good luck.

Matt
08-22-2006, 06:51 PM
A symbolic link is just for ease of management. You can upload AWStats to somewhere under /var/www/html/ or make a subdomain, e.g. stats.yourdomain.com, and upload AWStats to there.

David hit the nail on the head with password-protecting the directory if you install AWStats to any directory directly accessible via the Web server, e.g. /var/www/html/stats/, /home/stats/public_html/, and so on. You want to guard against accidentally making configuration files readable by the world. So ensure that wherever you install AWStats, that that directory is password protected ("Protect Directories" in the control panel).

Real-time generation is negligible in terms of CPU time for most sites. Of course if you're pulling in over 200,000 hits per day, then you should refrain from the auto-generation. If you're pulling in over 200,000 hits per day, you're probably not on the Minimalist level either. So certainly for the Minimalist package and low volume sites, real-time generation isn't an issue.

Now if you want to go the symlink route as mentioned in the Wiki, just file a troubleticket with the target and source you'd like to setup and I can get it done for you.

kprevas
08-22-2006, 08:09 PM
Thanks for your help - I think I'm almost there.

I've put awstats in a password-protected subdomain. The directory hierarchy leading to it is all permissioned 755, as is awstats.pl. When I try to access it from a browser, e.g. http://stats.[domain].com/awstats-6.5/wwwroot/cgi-bin/awstats.pl?config=[my config], it shows me the source of awstats.pl rather than executing it. What am I doing wrong?

Matt
08-22-2006, 08:20 PM
Create a file named .htaccess under /var/www/html/awstats-6.5/ (it should already be there if you password protected it) with the following lines:

Options ExecCGI
AddHandler cgi-script .pl

kprevas
08-22-2006, 08:47 PM
Oh, duh. Thanks.