To configure the Apache Web Server to work with Web Report Server/400:
ADDLIBLE RJSWRS
GO RJSWRS
CRTDUPOBJ OBJ(QTMHCGI) FROMLIB(QHTTPSVR) OBJTYPE(*SRVPGM)
Note: This example uses a web server instance named WEBSERVER1.
WRSAPACH1 WEBSVRNAME(WEBSERVER1)
Note: You can also use the browser-based Apache configuration screen to manually add web server directives.
The following lines are added to the AS/400 Apache web server configuration:
ScriptAliasMatch ^/RJSWRS/(.*) /QSYS.LIB/RJSWRS.LIB/$1.PGM
AllowOverride None
SetHandler cgi-script
Options +ExecCGI
order allow,deny
allow from all
GRTOBJAUT OBJ(RJSWRS/*ALL) OBJTYPE(*ALL) USER(*PUBLIC) AUT(*USE)
GRTOBJAUT OBJ(QSYS/RJSWRS) OBJTYPE(*ALL) USER(*PUBLIC) AUT(*USE)
CHGAUT OBJ('/RJSWRS/*') USER(*PUBLIC) DTAAUT(*RWX) OBJAUT(*ALL)
Note: The AS/400 Apache Web Server returns HTML files in EBCDIC format unless the web server setting is set correctly.
RJSWRS/WRSWEBSVR WEBSVR(APACHE)
RJSWRS/WRSWEBSVR WEBSVR(AS400HTTP)
DSPDTAARA DTAARA(RJSWRS/WRSWEBSVR)
Note: This example uses a web server instance named WEBSERVER1.
ENDTCPSVR SERVER(*HTTP) HTTPSVR(APACHEDFT)
WRKACTJOB SBS(QHTTPSVR)
STRTCPSVR SERVER(*HTTP) HTTPSVR(APACHEDFT)
http://1.1.1.1/RJSWRS/WRS200R?ACTION=INIT
If the web server is on a port other than port 80, use the following URL format, where 1.1.1.1 is your IP address and 1080 is the port:
http://1.1.1.1:1080/RJSWRS/WRS200R?ACTION=INIT
Still have questions? We can help. Submit a case to Technical Support.