Password Protecting Directories Using Apache - Eric Cables: ----------------------------------------------------------- First go to the directory in which the files you wish to password protect are located. Do the following: Make a file named .htaccess containing the following: AuthName "Brief Description" AuthType Basic AuthUserFile /dir/where/you/want/.htpasswd require valid-user Once that is completed, go to the directory where you have .htaccess looking for the .htpasswd file. You need to create a userlist for allowed-users. Do this by typing the following: cd /dir/where/you/want/.htpasswd htpasswd -c .htpasswd You will be prompted for a password, and confirmation. Finally you need to make a modification to the httpd.conf file. Add the following lines to httpd.conf and HUP the server. This should implement your password protection. Options Indexes FollowSymLinks AllowOverride AuthConfig Order allow,deny Allow from all Troubleshooting: ---------------- Check your error_log file if you are receiving any server errors, it is often very helpful. error_log example(s): [Thu Feb 3 13:48:20 2000] [error] [client 216.32.160.110] File does not exist: /home/httpd/html/mrtg/mrtg-m.gif [Thu Feb 3 13:48:20 2000] [error] [client 216.32.160.110] File does not exist: /home/httpd/html/mrtg/mrtg-l.gif [Thu Feb 3 13:48:20 2000] [error] [client 216.32.160.110] File does not exist: /home/httpd/html/mrtg/mrtg-r.gif The above is due to a file not found (duh!) -- [Thu Feb 3 13:39:32 2000] [alert] [client 216.32.160.110] /home/httpd/html/mrtg/.h taccess: AuthUserFile takes 1-2 arguments, text file containing user IDs and passwo rds [Thu Feb 3 13:39:34 2000] [alert] [client 216.32.160.110] /home/httpd/html/mrtg/.h taccess: AuthUserFile takes 1-2 arguments, text file containing user IDs and passwo rds The above is due to a mis-configured .htaccess file. No directory was specified after the line: AuthUserFile