Step 3 Set Security

Installing LANSA on IBM i

Step 3. Set Security

1.  From within your server instance of the IBM Web Administration for IBM i, expand the Server Properties menu and select Security to display the Security page.

2.  Use the Server area dropdown list set Location to: /cgi-bin

3.  Select the Authentication tab. Choose the Internet users in validation lists.

4.  Enter an authentication name of your choice.

5.  Press Add to specify the location of your validation list on the IBM i.

6.  Press Apply.

Sample IBM HTTP Server (powered by Apache)Configuration

Following is a sample IBM HTTP Server Instance configured for standard authentication running under V5R3 or later.

  • This Instance will run on Port 80.
  • The CGI library is DCXCOMLIB
  • The Validation List it uses is USERLIST in QGPL.

All requests to the Web Server using cgi-bin will require authentication.

# LANSA for the Web Apache HTTP Configuration File 

Alias /images /LANSA_dcxpgmlib/webserver/images
ScriptAliasMatch ^/cgi-bin/jsmdirect(.*) /QSYS.LIB/JSMLIB.LIB/JSMDIRECT.PGM$1 
ScriptAliasMatch ^/cgi-bin/lansaweb(.*) /QSYS.LIB/DCXCOMLIB.LIB/LANSAWEB.PGM$1 
ScriptAliasMatch ^/cgi-bin/lansaxml(.*) /QSYS.LIB/DCXCOMLIB.LIB/LANSAXML.PGM$1 
Listen *:80 
DocumentRoot /LANSA_dcxpgmlib/WebServer/www/htdocs
# DirectoryIndex /index.html  
ServerRoot /www/dcxpgmlib 
Options -ExecCGI -FollowSymLinks -SymLinksIfOwnerMatch -Includes -IncludesNoExec -Indexes -MultiViews 
DefaultFsCCSID 37 
DefaultNetCCSID 819 
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined 
LogFormat "%{Cookie}n \"%r\" %t" cookie 
LogFormat "%{User-agent}i" agent 
LogFormat "%{Referer}i -> %U" referer 
LogFormat "%h %l %u %t \"%r\" %>s %b" common 
CustomLog logs/access_log combined 
SetEnvIf "User-Agent" "Mozilla/2" nokeepalive 
SetEnvIf "User-Agent" "JDK/1\.0" force-response-1.0 
SetEnvIf "User-Agent" "Java/1\.0" force-response-1.0 
SetEnvIf "User-Agent" "RealPlayer 4\.0" force-response-1.0 
SetEnvIf "User-Agent" "MSIE 4\.0b2;" nokeepalive 
SetEnvIf "User-Agent" "MSIE 4\.0b2;" force-response-1.0 
SetEnvIf "User-Agent" ".*MSIE.*" nokeepalive ssl-unclean-shutdown downgrade-1.0 force-response-1.0 
ServerUserID DCXPGMLIB 
<Directory /> 
   Order Deny,Allow 
   Deny From all 
</Directory> 
<Directory /QSYS.LIB/JSMLIB.LIB> 
   Order Allow,Deny 
   Allow From all 
</Directory> 
<Directory /QSYS.LIB/DCXCOMLIB.LIB> 
   Order Allow,Deny 
   Allow From all 
</Directory> 
<Directory /LANSAIMG> 
   Order Allow,Deny 
   Allow From all 
</Directory> 
<Directory /LANSA_ii3pgmlib/WebServer/www/htdocs> 
   Order Allow,Deny 
   Allow From all 
</Directory> 
<Location /cgi-bin> 
  PasswdFile QGPL/USERLIST 
  AuthType Basic 
  AuthName "My Auth Realm" 
  Require valid-user 
</Location>
 

Go to Step 4. Register User in LANSA for Web.