![]() |
Simple statistics — rest assured | |
| home sign up more info support contact | ||
Limiting HTTP downloading with htaccessOne simple method for allowing Stats to safely download your log files is to make them available from your web server but secure it with a username and password. This has the advantage that the web server only allows Stats access to published information and that the username and password keep other users from accessing the logs. This tutorial assumes you have a Unix or Unix-like server running Apache. To set this up, you will need to have Telnet or Shell access to your web server. You should know the location of your log files and should be comfortable with on editor, such as 'vi' or 'pico'. To begin with log in to your web server using Telnet or another Shell client. Change directory to the folder where your web site documents are stored:
[siteadm@www siteadm]$ cd www/htdocs
Next use the
[siteadm@www htdocs]$ htpasswd -c log_user ~/.htpasswd-logs
New password: Re-type new password: Adding password for user /home/siteadm/.htpasswd-logs When creating the user, you will need to come up with a password and
enter that twice (to make sure you get it right). Remember what these are
so you can give them to Stats later. When the Now you need to create the
[siteadm@www htdocs]$ vi ../logs/.htaccess
The
AuthUserFile /home/siteadm/.htpasswd-logs
AuthGroupFile /dev/null AuthName "Private Website" AuthType Basic <Limit GET POST> require valid-user </Limit> Save the file and exit the editor. The final step on the server is to make
a link from the real logs folder to a place in your web site. If you are in
the web site documents directory you can use a command like this (where
[siteadm@www htdocs]$ ln -s ../logs/ logs
Now that you have set up your server, you can exit the Telnet or shell session
and continue to configure the Stats setup. Fill in the information
for the website using the new user name and password. For the For example, if your web site is ![]() |
| Copyright 2002-2005 Seven Simple Machines. Privacy policy. Terms of use. |