• Welcome to OS2World OLD-STATIC-BACKUP Forum.
 

News:

This is an old OS2World backup forum for reference only. IT IS READ ONLY!!!

If you need help with OS/2 - eComStation visit http://www.os2world.com/forum

Main Menu

Apache/2 and REXX question

Started by RobertM, 2008.06.05, 23:14:36

Previous topic - Next topic

RobertM

Hey all,

Here is what may be a silly question... I have a lot of REXX scripts I use on various websites (via Domino GoWebserver or Web2) and would like to use them (preferably unmodified) in Apache/2.

Is that possible? I cant find anything in the notes on how to enable REXX cgi support. I did find a REXX plugin, but it indicates it is for a far earlier version of Apache/2 (v1.x) and I am running Paul's latest build.

Thanks for any info or assistance any of you can provide!

Robert


|
|
Kirk's 5 Year Mission Continues at:
Star Trek New Voyages
|
|


achain

If your rexx scripts have ".cmd" extension, Apache/2 (including Paul's builds) can run them as CGI without any extra stuff.

Following message gives us a good explanation how Apache/2 executes a script:
http://silk.apana.org.au/pipermail/apache2/2003-March/002589.html

RobertM

I think I am definitely doing something wrong then... Apache definitely is not running my cmd files for me. Maybe I have a needed option off in the config file (it doesnt run PHP files either, unless they have the php extension).


|
|
Kirk's 5 Year Mission Continues at:
Star Trek New Voyages
|
|


achain

#3
Quote from: RobertM on 2008.06.06, 05:49:20
I think I am definitely doing something wrong then... Apache definitely is not running my cmd files for me. Maybe I have a needed option off in the config file (it doesnt run PHP files either, unless they have the php extension).

You should put your cmd file into /Apache2/cgi-bin. Default httpd.conf (that is copied from httpd.conf.sample) allows to run scripts only in this directory.

Single steps to test simple rexx script that I did...
1. Unpack Paul's Apache 2.2.8 into root directory of any drive e.g. e:\ .
2. Edit e:\Apache2\startup.cmd to change drive letter from u: to e: .
3. Copy e:\Apache2\conf\httpd.conf.sample to e:\Apache2\conf\httpd.conf
4. Run e:\Apache2\startup.cmd
5. Open http://localhost/ by web browser and see "It works!".
6. Copy attached test.cmd into e:\Apache2\cgi-bin
7. Open http://localhost/cgi-bin/test.cmd and see current date and time.

If you want to place your script files other than cgi-bin directory, you need to customize httpd.conf around:
- ScriptAlias directive
or
- ExecCGI option for Index directive
- AddHandler directive for .cmd file