HOWTO enable htaccess in RH73
=============================
by Thomas Chung
last updated 2003-07-12

Source: How do I make htaccess work?

1) create htpasswd file in /etc/httpd for a user "guest"

   # cd /etc/httpd
   # htpasswd -c htpasswd guest
   New password: *******
   Re-type new password: ******
   Adding password for user guest
 
2) create htaccess file in /var/www/html for a directory "restricted"
   
   # cd /var/www/html
   # mkdir restricted
   # cd restricted
   # vi .htaccess

   	AuthName "restricted"
	AuthType Basic
	AuthUserFile /etc/httpd/htpasswd
	Require user guest

3) enable htaccess option in /etc/httpd/conf/httpd.conf

   # cd /etc/httpd/conf
   # vi httpd.conf
   /htaccess (search for "htacces" section)
   AllowOverride All
   :wq (save and quit)

4) reload httpd

   # service httpd reload

5) test htaccess in restricted directory

  http://your-domain.com/restricted
  username: guest
  password: *****
  
  
Apache Directory Listing

Author: phpfreak
Date: 01/30/2004 22:18
This tutorial has been read 11567 times.
Curious about our formatting? View the Legend!
Configuring Apache to automatically list your directories is a simple task, however it can be complicated to find the information to do such. This tutorial will cover how to get the Apache Directory Listing to work by using the httpd.conf file and a .htaccess file.

httpd.conf Directory Listing Method


The most direct method to get your directory listings to show is using the httpd.conf. However, if you wish to use this method, you'll be required to have administrative privelages and the ability to restart the Apache Web Server as well as configure the httpd.conf file.

In your httpd.conf file, you'll need to add some directives such as:


Options +Indexes
IndexOptions FancyIndexing IconsAreLinks



The above code is a basic as it gets. You should restart Apache to make this work.

.htaccess Directory Listing Method


The next method would allow your users who have websites on your server perform a 
Directory Listing with Apache. 
You'll still need to allow the options in your httpd.conf file so that 
the user's .htaccess file will have the ability to set these directives.

First, the httpd.conf file should be set up to AllowOverride options. 
Here's how to quickly allow all options to be controlled by a .htaccess file.


AllowOverride All



Next, the user can create a file called ".haccess" inside the directory they wish to 
control and simply add the following in that file:

Options +Indexes
IndexOptions FancyIndexing IconsAreLinks