HTTPBACK is a utility that runs a web server in the "background" on MPE/iX. Normally, most web servers run as a process in an always-running batch job. This means that you have to be aware of that job when you change the JOB LIMIT, JOBFENCE, etc. Further, it shows up in SHOWJOB output. HTTPBACK runs the HTTPD program, in Unix terms, as a "daemon" process, which is neither a job nor a session. Installation and use -------------------- HTTPBACK has some hardcoded assumptions about a few file names... sorry, but that's not likely to change real soon. Put program file on disk as HTTPBACK.BIN.WWW. HTTPD must be HTTPD.BIN.WWW. Sample job assumes that the symbolic link /WWW/public points to the directory that contains the "htdocs" directory. E.g., on the machine at http://www.allegrosupport.com, we did: ln -s /WWW/WWW/httpd_1.3 /WWW/public Sample HTTPDJOB stream file (usually HTTPDJOB.BIN.WWW, but not necessarily) !job HTTPBACK,MGR.WWW/secret, bin; OUTCLASS=,1,1 ! !setvar hpautocont true ! !purge /WWW/public/logs/access_log.3 !rename /WWW/public/logs/access_log.2 , /WWW/public/logs/access_log.3 !rename /WWW/public/logs/access_log.1 , /WWW/public/logs/access_log.2 !copy /WWW/public/logs/access_log , /WWW/public/logs/access_log.1 ! !purge /WWW/public/logs/error_log.3 !rename /WWW/public/logs/error_log.2 , /WWW/public/logs/error_log.3 !rename /WWW/public/logs/error_log.1 , /WWW/public/logs/error_log.2 !copy /WWW/public/logs/error_log , /WWW/public/logs/error_log.1 ! !purge intercom.bin !purge outercom.bin !purge temp.bin ! !setvar hpautocont false ! !build intercom.bin;msg;rec=-80,16,f,ascii;disc=1000 !comment we DON'T do a "continue" in front of above...this MUST work! ! !comment probably not necessary, since HTTPBACK now does purge/build !comment of the INTERCOM file at start. ! !continue !build outercom.bin;msg;rec=-80,16,f,ascii;disc=10000 ! !run httpback.bin;info = "-x -c" ! !www priCS !comment set priority to CS subqueue ! !tell mgr.www; ran wwwstat and wusage !tellop; ran wwwstat and wusage ! !comment set stdlist = delete ! !eoj Notice the "www priCS" line? WWW is a command file in @.BIN.WWW, and looks like: parm COMMAND if finfo ("!command.input.www", 0) then FCOPY FROM=!command.INPUT.WWW;TO=INTERCOM.BIN.WWW else echo "Sorry, unknown command for WWW: !command ... try one of:" listf @.input.www endif So, we have a group called INPUT.WWW, with about a dozen flat ASCII files that have (usually) one word in each of them, where the word is generally the same as the name of the file. (E.g., EXIT.INPUT.WWW has the single word: EXIT) Sample files in @.INPUT.WWW: CLOSEOUT EXIT HELLO HELP KILL OPENOUT PRIBS PRICS PRIDS PRIES REPORT RESTART SHOW SHOWPROC START STATUS Contents of PRICS.INPUT.WWW: :print PRICS.INPUT.WWW PRIORITY CS Compile HTTPBACK.C: It can be compiled via my COMPILE utility: :compile httpback.c (directives are embedded as comments at the start of this file) or from the sh: Makefile lines to add to the Makefile from Jazz for httpd: httpback.o: httpback.c $(CC) -c $(CFLAGS) -Wc,+e $(AUX_CFLAGS) httpback.c httpback: httpback.o $(CC) $(LFLAGS) -o httpback httpback.o $(EXTRA_LIBS) cp httpback /WWW/BIN/HTTPBACK callci - < httpback.linkedit Note the "callci" line ... the original Makefile had a bug in doing a callci to add PM capability to the httpd program, so I tackled the problem in a different manner. Here's the contents of httpback.linkedit: httpback.linkedit linkedit "altprog HTTPBACK.BIN.WWW;cap=IA,BA,PM,PH" Running HTTPBACK: If you run it interactively, with no options, it will enter an interactive dialog, command driven. Try "HELP" If you want the "log http transfers to the system console" option, you'll need to: (a) add "-c" to the HTTPBACK INFO string, and (b) get the patched version of httpd from me. :) MICHECK 20140822