How to setup Apache JServ for MPE/iX (with mod_jserv compiled into httpd) ------------------------------------------------------------------------- Create the IX account, if it does not exist yet... :hello manager.sys :newacct ix,mgr ;pass=dontknow :altacct ix ;cap=+ph :altuser mgr.ix ;cap=+ph :altgroup pub.ix ;access=(r,x:any;w,a,l,s:AL) Create symbolic link for HFS name to the "home" of ApacheJServ/iX... :hello manager.sys :newlink /usr/local/apache , /IX/APACHE Create user and MPE group to provide ApacheJServ/iX "home" setup... :hello mgr.ix :newgroup apache.ix ;access=(r,w,a,l,x,s:GL) :newuser apache.ix ;pass=dontknow :altuser apache.ix ;home=apache ;cap=+ph,gl Logon as Apache.iX user to unpack files and perform setup... :hello apache.ix (optionally copy some helpful .exrc and .profile files here) :xeq /bin/sh -L Unpack the precompiled binary distribution (unless you ran your own build)... shell/iX> gzip -dc /tmp/ajs-139-11-mod.tar.gz | tar xvopf - Create lib directory and place Sun's Java Servlet Developer Kit in there... shell/iX> mkdir ~/lib # and download the jsdk.jar file into it! Copy the default config files, if this is your first installation... shell/iX> for f in conf/*.default; do; cp $f ${f%.default}; done shell/iX> for f in etc/*.default; do; cp $f ${f%.default}; done Now customize a few config files; see diff's below as an example... shell/iX> diff conf/httpd.conf.default conf/httpd.conf 238c238 < Port 80 --- > Port 8008 252,253c252,253 < User nobody < Group --- > #User nobody > #Group 260c260 < ServerAdmin you@your.address --- > ServerAdmin lappel@grc.hp.com 274c274 < #ServerName new.host.name --- > ServerName my3000.grc.hp.com 858a859,860 > > Include /usr/local/apache/etc/jserv.conf shell/iX> diff etc/jserv.conf.default etc/jserv.conf 20c20 < ApJServManual off --- > ApJServManual on 136c136 < allow from localhost --- > allow from localhost myPC.grc.hp.com shell/iX> diff etc/zone.properties.default etc/zone.properties 76c76 < singleThreadModelServlet.initialCapacity=5 --- > singleThreadModelServlet.initialCapacity=2 81c81 < singleThreadModelServlet.incrementCapacity=5 --- > singleThreadModelServlet.incrementCapacity=2 Notice that to run the Apache server with a port number below 1024 (like the default http port number 80), you will need to move the httpd program file to an MPE group with PM capability, give it an MPE style name (unlike the lowercase HFS name) and use LINKEDIT ALTPROG to grant the program PM. Here are a few helpful command line options of httpd... shell/iX> bin/httpd -v # to show version info shell/iX> bin/httpd -l # to list built-in modules shell/iX> bin/httpd -h # to see additional options shell/iX> bin/httpd -t # to test config syntax You can now start the server by streaming two jobs... shell/iX> callci stream ./lib/httpd.job shell/iX> callci stream ./lib/jserv.job Check showjob, showproc, or spoolfiles to see if the jobs stay up. shell/iX> callci showproc job=apache.ix The server jobs write diagnostic messages to several logfiles... shell/iX> wc -l logs/* # to see the line count of the logs shell/iX> tail logs/error_log # too see the last few lines The web pages reside in the ./htdocs directory tree by default. There is a subdirectory with the Apache documentation. The Apache JServ docs reside in ./docs by default. You might want to make them "visible" in the regular web page tree with a symbolic link... shell/iX> ls -l htdocs shell/iX> ln -s $PWD/docs htdocs/jservdoc If you want to also test CGI, you can enable an example script... shell/iX> chmod 755 cgi-bin/test-cgi And now test a few URLs to see if things are working properly... http://my3000.grc.hp.com:8008 http://my3000.grc.hp.com:8008/manual/ http://my3000.grc.hp.com:8008/cgi-bin/test-cgi/trying?name=lars http://my3000.grc.hp.com:8008/jservdoc/ http://my3000.grc.hp.com:8008/servlet/Hello http://my3000.grc.hp.com:8008/servlet/IsItWorking http://my3000.grc.hp.com:8008/jserv/ You should see info on the above browser requests in some of the logfiles. To stop the server jobs you can use the following two helpers... shell/iX> exit :stream ./lib/httpd.stop # or use abortjob on the httpd job :stream ./lib/jserv.stop # or use abortjob on the jserv job :bye