
- Awstats password protect how to#
- Awstats password protect mac os#
- Awstats password protect password#
Using either sudo or su, in Terminal, type: Thus, all you need to stipulate is the file name, which is “.htpasswd”.
Awstats password protect password#
Note we did not include your password after the term “.htpasswd” in the directive above, because the user name and password are inside that file. # Next directive protects awstats directoryĪuthUserFile /users/yourmacusername/.htpasswd Include the lines that begin with #, which are comment lines, so you can find the section again, and know what this directive does (sorry, WordPress won’t let me use brackets to enclose the opening and closing “Directory” entries below): Go down past that directive, which ends in /Directory (sorry, WordPress again), and add these lines. If you don’t have line numbers in your editor, search for this term (sorry, WordPress won’t let me give the exact wordage here): If you have line numbers, you can look for Line #343. Open up the nf file with your text editor. We will further assume that you have only put the stuff that was in the original AWSTATS However, if your setup is different, just adjust the instructions below. We will assume your awstats folder is in: /Library/WebServer/CGI-Executables/awstats.
Awstats password protect how to#
Rather than give a lesson on how to use these text editors, I will just tell you what needs to be done, and you can figure out how to do it, using the text editor of your choice. And of course, you can also use the Unix text processors such as vi, pico, or Joe. You can also use TextEdit, but you won’t have line numbers. The nf file is a whole lot easier to read if you have a text program that can read line numbers, such as TextWrangler (free) or Smultuon (free). If you put it in /etc/, be sure to also change the group to either “Step 2: Creating the directive in /etc/apache2/nf Not so bad, huh? Before you ask: Yes, you can put the file anywhere you want - just don’t put it in the Apache root, or anywhere that can be reached with a web browser.

Once you enter the information above, using your own information, you will be prompted to enter a password, and you will be asked to type it again. To sum up, we’re telling OS X to create a htpassword file, put it in the /users folder under your Mac user name, name that file “.htpassword”, and use the user name you specified. In the example above, the -c stands for “create a file” and the “m” stands for “encrypt the password with MD 5 encryption. > htpasswd -cm /users/yourmacusername/.htpasswd usernameforthefile In terminal, either as sudo or superuser, type this, subsituting your information for the example data: Just be sure you backup your nf before editing it … just in case. Creating a directive in the /etc/apache2/nf file.

This file will contain a user name and password, and that password will be MD5-encypted.Ģ. This is a three-step procedure, that you will perform in Terminal:ġ.
Awstats password protect mac os#
This should also work for earlier versions of Mac OS X. If you’re running an Apache server on Mac OS 10.5.5 (or earlier), inlcuding your own personal server, there is a way to password-protect your AWSTATS folder, using your htpasswd and your nf file. One of the more irritaing things you see when you look at your AWSTATS totals each day is seeing how many other people are also looking at your stats. Protect AWSTATS from prying eyes on Mac OS 10.5 Leopard
