Help with installing awstats

Alright, this is all very new to me and so yeah, I’m having some difficulties.

Right now I’m following the instructions at attempting to install awstats. I’m currently stuck at the heading where it says “Setting up the Domain Name”.

I made a shell account so that I could use Putty to do these things. I have Enable ssh/telnet? clicked and Type is set to /bin/bash. I tried to create a directory using my shell under my domain name but the shell account does not have access to that and I’m not sure why. Do I have the wrong combination of settings? I can access it with my normal FTP login though of course.

I also noticed that while I’m on my initial FTP login account, I’m unable to see the awstats folder I created while under my shell account.

I realize that this is probably something silly that I overlooked because I’m a total newb but regardless, I’m totally stumped.

If anyone can offer some help, thank you very much. Also, while I’m at it, is there anything else I should know for when following the dreamhost wiki instructions for setting up awstats?

Thank you!!

Nevermind the previous post, I figured out how to install awstats. However, how do I set it up so that not just anyone can view the statistics by just randomly guessing the statistics directory?

You can use Apache authentication on the awstats directory. You can set it up manually with an .htaccess/htpasswd combo, or you can do it from the Control Panel–>Goodies–>Webdav/.htaccess screens (make sure you only use the .htaccess protection not the webdav). Good Luck!


I tried to set up a password using the control panel method but now whenever I try to visit the statistics page, instead of being prompted for a password or something, instead I’m reaching the 404 page of the wordpress blog that I installed.

Is there something more that I need to do or something that I’m missing?

Thank you very much.

Aha! That’s another matter altogether. What you are seeing there is “battling” .htaccess files.

.htaccess files impact the directory they are in and all directories beneath them in the directory tree. This results in the .htaccess file for WordPress (living, for example, at /home/user/domain.tld) impacting the directory where you have awstats (living, for example, at /home/user/domain.tld/awstats), or any other directory below the “base” of your WordPress install.

This .htaccess file (for WordPress) includes Apache mod_rewrite rules that return the 404 page of the WordPress blog for any request that is not part of the WordPRess “structure” (and WordPress knows nothing about your awstats directory), hence, they intercept the request for and return the WordPress related 404 page.

The fix is really easy, and is well documented in the DH Wiki article on making stats available with .htaccess; you just use the concepts/examples there to make the appropriate entries to the WordPress .htaccess file (the one located in the “base” directory of your WordPRess install) to enable the request for your awstats directory to be processed.

Your changes will be slightly different from those detailed in the wiki article, as the example uses the default /home/user/domain.tld/stats directory where DH places analog, but it is trivial to modify that example code to do the same thing for your awstats directory (or any other, for that matter).

There is also lots of discussion/help in these forums on that topic (just search).

Once you have made the appropriate changes to your WordPress .htaccess file, to modify the re-write rules so your awstats directory will be served when requested, your awstats .htaccess file that sets up password protection will come into play, and you will be presented with the authentication dialog when you browse to it. :slight_smile: