How to protect awstats folder

Discussion in 'Installation/Configuration' started by, Oct 20, 2009.

  1. New Member

    hi, i use awstats for statistics in ispconfig 2.2.33, but i would like to protect the folder with name and password like weblizer does. Any help? thanks
  2. punto

    punto New Member

    This is how I do it.

    Under the apache directives for your website add this

    <FilesMatch ''>
    AuthName 'Login Required'
    AuthType Basic
    AuthUserFile /var/www/
    require valid-user

    Replace with the website you are wanting to protect. Click save and then open up an ssh session to the server.

    Now you need to create the .htpasswd file and the username and password needed to connect and open the stats page.

    Typically the .htpasswd file can go anywhere but it is best not to have it in your web root directory so I place it one level up (as above in the AuthUserFile directive)

    Issue this command on the shell:

    htpasswd -c /var/www/ username

    the username is the username you want to use. You will then be prompted for a password, confirm once and you are done :)

    Now when you browse to the awstats page you will be prompted for a username and password.

  3. jnsc

    jnsc rotaredoM Moderator

    But the password protection is/should be created automaticly. Is it not working for you? ll try to delete my .htaccess and see if it gets regenerated.

Share This Page