On Wednesday 25 Mar 2009, Ashish Verma wrote:
#htpasswd -c /mount/repositories/av1984_apache_authfile ashish
*/*use password as password*/*
#ls -l /mount/repositories/av1984_apache_authfile
-rw-r--r-- 1 root root 21 2009-03-25 12:32
/mount/repositories/av1984_apache_authfile
^^^^^^^^^^^^^^^^^^
#vi /mount/repositories/index.html
<html>
<body>
<a href=/fc10/>Fedora10 Repository</a>
<br>
<a href=/rhl4/>RHEL4 Repository</a>
</body>
</html>
#vi /etc/httpd/conf/httpd.conf
<VirtualHost *:80>
ServerAdmin ashish@xxxxxxxxxx
DocumentRoot /mount/repositories/
ServerName yum.av1984.net
Options Indexes FollowSymLinks
ErrorLog logs/yum_log
CustomLog logs/yum_log common
<Directory /mount/repositories/>
Options Indexes
AllowOverride None
</Directory>
<Directory /mount/repositories/rhl4>
Options Indexes FollowSymLinks
AllowOverride None
AuthType Basic
AuthName "av1984_auth"
AuthUserFile /mount/repositories/av1984_apache_authfile
Require ashish valid-user
</Directory>
<Directory /mount/repositories/fc10>
Options Indexes FollowSymLinks
AllowOverride None
</Directory>
</VirtualHost>