Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I am working on converting our IBM 1

Status
Not open for further replies.

iSeriesCodePoet

Programmer
Jan 11, 2001
1,373
US
I am working on converting our IBM Original HTTP web server to Apache. I have virtual hosts figured out and folders figured out, but now I need to get CGI working. Apache's documentation doesn't seem to be the best on this subject. Is there any better documentation around?

Basically my question is how to convert this into Apache:
Exec /cgi-lawson/del-save.pgm* /LAW7/web/cgi-lawson/del-save.pgm*
Exec /cgi-lawson/del-save.exe* /LAW7/web/cgi-lawson/del-save.pgm*
Exec /cgi-lawson/del-save* /LAW7/web/cgi-lawson/del-save.pgm*
Exec /cgi-lawson/redirectusr.pgm* /LAW7/web/cgi-lawson/redirectusr.pgm*
Exec /cgi-lawson/redirectusr.exe* /LAW7/web/cgi-lawson/redirectusr.pgm*
Exec /cgi-lawson/redirectusr* /LAW7/web/cgi-lawson/redirectusr.pgm*
Exec /cgi-lawson/textgif.pgm* /LAW7/web/cgi-lawson/textgif.pgm*
Exec /cgi-lawson/textgif.exe* /LAW7/web/cgi-lawson/textgif.pgm*
Exec /cgi-lawson/textgif* /LAW7/web/cgi-lawson/textgif.pgm*
Exec /cgi-lawson/logansrch.pgm* /LAW7/web/cgi-lawson/logansrch.pgm*
Exec /cgi-lawson/logansrch.exe* /LAW7/web/cgi-lawson/logansrch.pgm*
Exec /cgi-lawson/logansrch* /LAW7/web/cgi-lawson/logansrch.pgm*
Exec /cgi-lawson/*.exe/ /LAW7/web/cgi-lawson/*.pgm
Exec /cgi-lawson/*.exe /LAW7/web/cgi-lawson/*.pgm
Exec /cgi-lawson/*.pgm /LAW7/web/cgi-lawson/*.pgm
Exec /cgi-lawson/* /LAW7/web/cgi-lawson/*.pgm
Exec /cgi-bin/* /LAW7/web/cgi-lawson/*

This is what IBM's migration program built, but it doesn't work:
<Directory /LAW7/web/cgi-lawson/*.pgm>
Options +ExecCGI
Order allow,deny
Allow from All
</Directory>
<Directory /LAW7/web/cgi-lawson/logansrch.pgm*>
Options +ExecCGI
Order allow,deny
Allow from All
</Directory>
<Directory /LAW7/web/cgi-lawson/textgif.pgm*>
Options +ExecCGI
Order allow,deny
Allow from All
</Directory>
<Directory /LAW7/web/cgi-lawson/redirectusr.pgm*>
Options +ExecCGI
Order allow,deny
Allow from All
</Directory>
<Directory /LAW7/web/cgi-lawson>
Options +ExecCGI
Order allow,deny
Allow from All
<Files del-save.pgm*>
Options +ExecCGI
Order allow,deny
Allow from All
</Files>
<Files *.pgm>
Options +ExecCGI
Order allow,deny
Allow from All
</Files>
<Files logansrch.pgm*>
Options +ExecCGI
Order allow,deny
Allow from All
</Files>
<Files textgif.pgm*>
Options +ExecCGI
Order allow,deny
Allow from All
</Files>
<Files redirectusr.pgm*>
Options +ExecCGI
Order allow,deny
Allow from All
</Files>
</Directory>
<Directory /LAW7/web/cgi-lawson/del-save.pgm*>
Options +ExecCGI
Order allow,deny
Allow from All
</Directory>
ScriptAliasMatch ^/cgi-lawson/del-save\.pgm(.*)$
/LAW7/web/cgi-lawson/del-save.pgm$1
ScriptAliasMatch ^/cgi-lawson/del-save\.exe(.*)$
/LAW7/web/cgi-lawson/del-save.pgm$1
ScriptAliasMatch ^/cgi-lawson/del-save(.*)$
/LAW7/web/cgi-lawson/del-save.pgm$1
ScriptAliasMatch ^/cgi-lawson/redirectusr\.pgm(.*)$
/LAW7/web/cgi-lawson/redirectusr.pgm$1
ScriptAliasMatch ^/cgi-lawson/redirectusr\.exe(.*)$
/LAW7/web/cgi-lawson/redirectusr.pgm$1
ScriptAliasMatch ^/cgi-lawson/redirectusr(.*)$
/LAW7/web/cgi-lawson/redirectusr.pgm$1
ScriptAliasMatch ^/cgi-lawson/textgif\.pgm(.*)$
/LAW7/web/cgi-lawson/textgif.pgm$1
ScriptAliasMatch ^/cgi-lawson/textgif\.exe(.*)$
/LAW7/web/cgi-lawson/textgif.pgm$1
ScriptAliasMatch ^/cgi-lawson/textgif(.*)$
/LAW7/web/cgi-lawson/textgif.pgm$1
ScriptAliasMatch ^/cgi-lawson/logansrch\.pgm(.*)$
/LAW7/web/cgi-lawson/logansrch.pgm$1
ScriptAliasMatch ^/cgi-lawson/logansrch\.exe(.*)$
/LAW7/web/cgi-lawson/logansrch.pgm$1
ScriptAliasMatch ^/cgi-lawson/logansrch(.*)$
/LAW7/web/cgi-lawson/logansrch.pgm$1
ScriptAliasMatch ^/cgi-lawson/(.*)\.exe/$ /LAW7/web/cgi-lawson/$1.pgm
ScriptAliasMatch ^/cgi-lawson/(.*)\.exe$ /LAW7/web/cgi-lawson/$1.pgm
ScriptAliasMatch ^/cgi-lawson/(.*)\.pgm$ /LAW7/web/cgi-lawson/$1.pgm
ScriptAliasMatch ^/cgi-lawson/(.*)$ /LAW7/web/cgi-lawson/$1.pgm
ScriptAliasMatch ^/cgi-bin/(.*)$ /LAW7/web/cgi-lawson/$1

Any help would be appreciated! Mike Wills
IBM iSeries (AS/400) Programmer
[pc2]
 
Hi mate,

Quite a bit of code to work out but the following should do the exact same but in a portion of the code.

Code:
ScriptAliasMatch ^/cgi-lawson(.*) /LAW7/web/cgi-lawson$1
ScriptAliasMatch ^/cgi-bin(.*) /LAW7/web/cgi-lawson$1
ScriptAliasMatch ^/cgi-lawson/(.*)\.exe$ /LAW7/web/cgi-lawson/$1.pgm
<Directory /LAW7/web/cgi-lawson>
   Options +ExecCGI
   Order allow,deny
   Allow from All
</Directory>
<Files *.pgm>
   Options +ExecCGI
   Order allow,deny
   Allow from All
</Files>

Hope this helps Wullie

sales@freshlookdesign.co.uk

The pessimist complains about the wind. The optimist expects it to change. The leader adjusts the sails. - John Maxwell
 
Thanks, the javascript error is fixed now I get the error:
[Fri Sep 13 08:34:20 2002] [error] [client 172.25.9.92] ZSRV_MSG0109: /LAW7/web/cgi-lawson/authen.exe is not a cgi program: /LAW7/web/cgi-lawson/authen.exe, referer:
Any ideas? Mike Wills
IBM iSeries (AS/400) Programmer
[pc2]
 
Hi mate,

the javascript error is fixed

I'm lost.. What js error?

[Fri Sep 13 08:34:20 2002] [error] [client 172.25.9.92] ZSRV_MSG0109: /LAW7/web/cgi-lawson/authen.exe is not a cgi program: /LAW7/web/cgi-lawson/authen.exe

Is the exe compiled correctly for use as a web based script?

Hope this helps Wullie

sales@freshlookdesign.co.uk

The pessimist complains about the wind. The optimist expects it to change. The leader adjusts the sails. - John Maxwell
 
The index page is 100% javascript (and I assume every other page is also. This a free part of a finacial suite that we are using. We got a javascript error when we where loading the page. I assumed it couldn't find the CGI program. Now that works.

But now Apache doesn't realize that these programs are CGI programs. Just a thought, is there a special way you need to program CGI programs to work under Apache? Mike Wills
IBM iSeries (AS/400) Programmer
[pc2]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top