OS2 World.Com Forum
2012.05.21, 22:03:00 *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Apache/2 and REXX question  (Read 5028 times)
RobertM
Global Moderator
Hero Member
*****
Posts: 2011



View Profile WWW
« on: 2008.06.05, 23:14:36 »

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
Logged

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

achain
Newbie
*
Posts: 9


View Profile
« Reply #1 on: 2008.06.06, 04:53:27 »

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
Logged
RobertM
Global Moderator
Hero Member
*****
Posts: 2011



View Profile WWW
« Reply #2 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).
Logged

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

achain
Newbie
*
Posts: 9


View Profile
« Reply #3 on: 2008.06.06, 07:35:21 »

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
« Last Edit: 2008.06.06, 07:38:25 by achain » Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.14 | SMF © 2006-2011, Simple Machines LLC
Joomla Bridge by JoomlaHacks.com
Valid XHTML 1.0! Valid CSS!