5. Packages :: 06 Apache

Table of Contents

Various features for Apache

Passwd a Directory

Condensed and added to from http://www.linuxhelp.net/guides/htaccess/
Edit pico /etc/httpd/conf/httpd.conf

and after this section:

<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>

add the following, or some variation of it:

<Directory "/var/www/html/mymrtg">
AllowOverride AuthConfig
Options Indexes FollowSymLinks Includes
Order allow,deny
Allow from all
</Directory>
OR
<Directory "/var/www/cgi-bin">
AllowOverride AuthConfig
Options Indexes FollowSymLinks Includes
Order allow,deny
Allow from all
</Directory>
/etc/init.d/httpd restart

In each of the directories you need the following file, .htaccess:

touch /var/www/html/mymrtg/.htaccess
pico /var/www/html/mymrtg/.htaccess
AuthName "MRTG Graphs/Html restricted access"
AuthType Basic
AuthUserFile /var/www/members/.htpasswd
require user mrtgadmin
require user admin

This has created the file that points to the password file and what users are allowed to access this directory.
This also throws up the Dialog Box Title.
Now:

mkdir /var/www/members
htpasswd -c /var/www/members/.htpasswd username
htpasswd /var/www/members/.htpasswd 2ndname

 

 

 

Next Page: Yum Upgrades