Setting Up an MRTG Web Host

Procedure:

Create .htaccess file

  1. Login as root

  2. Go to directory:

/opt/dialogic/common/mrtg_logs

  1. Create a file called “.htaccess”

  2. 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)

  1. Save the file

  2. Change the privileges on .htaccess

chmod 777 .htaccess

 

Create a password for the UserName

  1. Login as root

  2. Go to directory /opt/dialogic/common/mrtg_logs

  3. Type the following where excelsw is the username from procedure 1

htpasswd –c /opt/dialogic/common/mrtg_logs/.htpasswd excelsw

 

Edit the httpd.conf file

  1. Login as root

  2. Go to directory /etc/httpd/conf

  3. Change the DocumentRoot as shown in bold below:

DocumentRoot "/opt/dialogic/common/mrtg_logs"

  1. Setup for password protection:

  1. Find the section that begins with the line “This should be changed to whatever you set DocumentRoot to.”

  2. 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>

 

  1. Change the DirectoryIndex as follows:

DirectoryIndex systemindex.html index.html.var

 

  1. Save the httpd.conf file

 

Restart the Apache Web Server

  1. Restart the Apache Server by typing the following:

/sbin/service httpd restart

/sbin/chkconfig httpd on