Login as root
Go to directory:
/opt/dialogic/common/mrtg_logs
Create a file called “.htaccess”
Add the following lines to the file:
AuthName "Please enter your UserName and Password."
AuthType Basic
AuthUserFile /opt/dialogic/common/mrtg_logs/.htpasswd
AuthGroupFile /dev/null
Require user excelsw (Where excelsw is the username)
Save the file
Change the privileges on .htaccess
chmod 777 .htaccess
Login as root
Go to directory /opt/dialogic/common/mrtg_logs
Type the following where excelsw is the username from procedure 1
htpasswd –c /opt/dialogic/common/mrtg_logs/.htpasswd excelsw
Login as root
Go to directory /etc/httpd/conf
Change the DocumentRoot as shown in bold below:
DocumentRoot
"/opt/dialogic/common/mrtg_logs"
Setup for password protection:
Find the section that begins with the line “This should be changed to whatever you set DocumentRoot to.”
Change the areas shown in bold below (notice the comment (#) added to the last two lines):
#
# This should be changed to whatever you set DocumentRoot to.
#
<Directory "/opt/dialogic/common/mrtg_logs">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs-2.0/mod/core.html#options
# for more information.
#
Options FollowSymLinks
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride All
#
# Controls who can get stuff from this server.
#
# Order allow,deny
# Allow from all
</Directory>
Change the DirectoryIndex as follows:
DirectoryIndex systemindex.html index.html.var
Save the httpd.conf file
Restart the Apache Server by typing the following:
/sbin/service httpd restart
/sbin/chkconfig httpd on