Enabling Basic Authentication on Apache HTTP Server

Enable the basic authentication on Apache HTTP server.

Procedure

  1. Open a terminal window.
  2. Navigate to ASG_HOME/modules/http_server/apache directory.
  3. Edit the mod_ASG.conf file.
  4. Search for the following section in the file:
       <Location/>
       SetHandler asg_rv_inbound_handler
       AsgSubject _LOCAL.asg.north.request
       AsgTimeout 30
       </Location>
  5. Insert the configuration for a new location above the old location configuration as follows:
       <Location /asg/ba>
       AuthType Basic
       AuthName "ASG"
       # (Following line optional, file is default)
       AuthBasicProvider file
       AuthUserFile /home/asg/apache/htpasswd/htpasswords
       Require validuser
       SetHandler asg_rv_inbound_handler
       AsgSubject _LOCAL.asg.north.request
       AsgTimeout 30
       </Location>
  6. Verify that the location changes are as follows:
       <Location /asg/ba>
       AuthType Basic
       AuthName "ASG"
       # (Following line optional, file is default)
       AuthBasicProvider file
       AuthUserFile /home/asg/apache/htpasswd/htpasswords
       Require validuser
       SetHandler asg_rv_inbound_handler
       AsgSubject _LOCAL.asg.north.request
       AsgTimeout 30
       </Location>
       <Location / >
       SetHandler asg_rv_inbound_handler
       AsgSubject _LOCAL.asg.north.request
       AsgTimeout 30
       </Location>
    Note: This location change enforces user access with basic authentication.
  7. Save the mod_ASG.conf file.