WebDocs - iSeries Edition Apache Configuration

From Support

Jump to: navigation, search

As of V5R3, IBM has changed the default webserver on OS/400 to the Apache Web Server. This knowledge article serves as a guide to configuring the WebDocs software to work with the Apache Web Server.

For this example, we are assuming that we are working with a web server instance named APACHEDFT, which all System i systems come preconfigured with.

Contents

Step 1: Stop Apache

Before making configuration changes to the Apache web server, make sure to the Apache web server instance is not running by using the following command:

WRKACTJOB SBS(QHTTPSVR) JOB(APACHEDFT*) 

If the Apache server is running, end it with the following command:

ENDTCPSVR SERVER(*HTTP) HTTPSVR(APACHEDFT) 

Step 2: Configure Apache

Open the Apache Web Server configuration by using the following command to navigate to the /WWW folder where all Apache configurations reside:

WRKLNK '/WWW/*' 

Note: Each Apache instance has its own folder under the /WWW directory. We will be using the APACHEDFT instance for our example.

Select option 5 for the APACHEDFT folder and press Enter.

You will now see 3 folders:

  • conf (This is the configuration folder)
  • htdocs (This is the Apache default virtual web site root folder to store all HTML docs and WebDocs web server image files.)
  • logs (This is the Apache log directory and will not be used for our configuration purposes.)

Select option 5 for the conf folder and press Enter.

Select option 2 to edit the httpd.conf file. This is the Apache configuration file for the apachedft web server instance. This file is in ASCII format, but can be edited with option 2.

Optionally add or change the following line to httpd.conf if you wish to run the apachedft on a TCP/IP port other than 80. You can simply type in the edit area to change date in the text file. Place an "I" in the Cmd field on the left side of the editor and press Enter to insert a blank line as needed.

Required: Please update your httpd.conf file with the following configurations; compare existing options and add any missing lines to the file.

Add all of the following CGI configuration lines to the configuration member exactly as listed below:

Listen *:1080                                   
                                                
DocumentRoot /www/apachedft/htdocs
                                                
# Deny most requests for any file               
<Directory />                                   
  order allow,deny                              
  deny from all                                 
  Options -Indexes -ExecCGI -includes           
  AllowOverride Limit Options                   
</Directory>                                    
                                                
# Allow requests for files in document root     
<Directory /www/apachedft/htdocs/RJSIMAGE>                
  order allow,deny                                                     
  allow from all                                                       
</Directory>                                                           
                                                                       
ScriptAliasMatch ^/IMAGESERVER/(.*) /QSYS.LIB/RJSIMAGE.LIB/$1.PGM      
<Directory /QSYS.LIB/RJSIMAGE.LIB/>                                    
SetHandler cgi-script                                                  
Options +ExecCGI                                                       
order allow,deny                                                       
allow from all                                                         
CgiConvMode %%EBCDIC/MIXED%%                                           
</Directory>                                                           

Press F3 to save and exit the configuration member.

Step 3: Copy to RJSIMAGE

Now all of the WebDocs work images must be copied to the htdocs folder into a subfolder named: rjsimage. Use the following steps to copy the images from /rjsimage to /www/apachedft/htdocs/RJSIMAGE

Go to the RJSIMAGE menu and run option 20 to initially restore the WebDocs images to a folder named:

/RJSIMAGE

Step 4: Start Apache

Start the Apache web server instance using the following command:

STRTCPSVR SERVER(*HTTP) HTTPSVR(APACHEDFT)

Then make sure the web server instance started:

WRKACTJOB SBS(QHTTPSVR) JOB(APACHEDFT*) 

Step 5: Access WebDocs

You can now access the WebDocs login using the following http URL. Our example assumes the System i is on IP address 1.1.1.1. Yours will be different and will match the IP address of your System i system.

http://1.1.1.1/imageserver/doc100r?action=init

All other aspects of WebDocs should work as usual. If you made it this far you have successfully configured the Apache web server for the iSeries to be used with WebDocs.

Personal tools