Yes, if it's prompting for download it is connecting to the
CGI, but the content-type headers are incorrect.

Not sure on the config.  I always use ScriptAliasMatch like
this:

ScriptAliasMatch ^/cgi-bin/(.*)
/qsys.lib/bvstools.lib/$1.pgm 

That way url/cgi-bin/mypgm 

will map to mypgm.pgm.

On Mon, 15 May 2006 11:11:45 -0500
 "Shannon ODonnell" <sodonnell@xxxxxxxxxxxxxxxxx> wrote:
> I'll do better than that. I'll post the whole config. All
> of this also has
> to be SSL enabled so I went ahead and put that back in
> too in the config
> file.
> 
> I can bring up the main index page with just the domain
> name in the address
> bar, no problem.      http://mydomain.com
> 
> And I can also bring up the main index page in the
> address bar using
> https://mydomain.com. 
> 
> Also, I can open my own CGI program (one I wrote to see
> if the CGI
> directives were set up correctly or not) and I can access
> it securely using 
> 
> https://mydomain.com/cgi-bin/mycgiapp
> 
> 
> However, when I attempt to open one of the existing
> CGIDEV2 programs the
> browser does not know what to do with it and instead
> prompts me to save it
> to my hard drive.
> 
> This leads me to believe that the CGI directives probably
> are correct, but
> that the content-type value is missing from the CGIDEV2
> program.  But I've
> been wrong before...
> 
> Thanks for looking at this.
> 
> Shannon O'Donnell
> 
> 
> LoadModule ibm_ssl_module
> /QSYS.LIB/QHTTPSVR.LIB/QZSRVSSL.SRVPGM
> Listen *:80
> Listen *:443
> DocumentRoot /www/cpureports
> Options -ExecCGI  
> NameVirtualHost 130.94.124.2:443
> DirectoryIndex index.html
> AlwaysDirectoryIndex Off
> ScriptAlias /cgi-bin/ /QSYS.LIB/C52CGI.LIB/
> #Mapmatch ^/cgi-bin/(.*) /cgi-bin/$1.PGM 
> 
> <Directory />
>     order deny,allow
>     deny from all 
>     UserID %%SERVER%% 
> </Directory>
> 
> <Directory /www/cpureports/>
>     order allow,deny  
>     allow from all  
> </Directory>
> 
> <Directory /c52cgi/>
>     order allow,deny  
>     allow from all  
> </Directory>
>  
> 
> <Location />
> <LimitExcept GET HEAD OPTIONS POST TRACE>
>     Order Allow,Deny 
>     Deny From all 
> </LimitExcept>
> </Location>
> 
> <VirtualHost 130.94.124.2:443>
>     ServerName cpu720.network.com
>     DocumentRoot /www/cpureports
>     SSLEnable
>     SSLAppName QIBM_HTTP_SERVER_CPUREPORTS
>   <Directory /QSYS.LIB/C52CGI.LIB/>
>      Options +ExecCGI
>      SetHandler cgi-script
>      Order allow,deny
>      Allow from all 
>   </Directory>
>    
> </VirtualHost>
> 
> 
> -----Original Message-----
> From: web400-bounces@xxxxxxxxxxxx
> [mailto:web400-bounces@xxxxxxxxxxxx] On
> Behalf Of Brad Stone
> Sent: Monday, May 15, 2006 11:20 AM
> To: Web Enabling the AS400 / iSeries
> Subject: Re: [WEB400] CGIDEV Question
> 
> Post the scriptalias directive.  Maybe it's set up so you
> don't need the .pgm at the end of the program name.
> 
> But, if you can't even telnet to port 80, I'd question if
> the HTTP server is running or set up properly.
> 
> On Mon, 15 May 2006 10:05:35 -0500
>  "Shannon ODonnell" <sodonnell@xxxxxxxxxxxxxxxxx> wrote:
> > The ScriptAlias directive was already there, fyi, but
> > that was a great idea
> > to check.
> > 
> > I tried to open a telnet session as you suggested, but
> I
> > get a "Connecting
> > to mysystem...Could not open connection to the host, on
> > port 80: Connect
> > failed"  error message.   I am able to open up a
> > non-cgidev2 CGI program
> > (one I wrote from scratch) but just not the ones that
> > used to work on the
> > old system. To my knowledge, these are the exact same
> > programs as they were
> > on the old system. 
> > 
> > Can you suggest anything I might check to make the
> telnet
> > mysystem.com 80
> > work as you suggested?  That sounds like a great lead
> to
> > follow if I can
> > only make it work.
> > 
> > Thanks!    
> > 
> > Shannon O'Donnell
> > 
> > 
> > -----Original Message-----
> > From: web400-bounces@xxxxxxxxxxxx
> > [mailto:web400-bounces@xxxxxxxxxxxx] On
> > Behalf Of web400@xxxxxxxxxxxxxxxx
> > Sent: Sunday, May 14, 2006 4:41 PM
> > To: Web Enabling the AS400 / iSeries
> > Subject: Re: [WEB400] CGIDEV Question
> > 
> > 
> > > On the new system, when I attempt to open one of the
> > /cgi-bin/MYPGM.PGM 's
> > > my browser does not know what to do with it and tries
> > to save it to my
> > hard
> > > drive instead of opening it.  It's like it must be
> > missing the
> > content-type
> > > value in the HTML.
> > 
> > My first guess would be that you're missing the
> > ScriptAlias directive (or 
> > EXEC on the orignal server) so the web server is tryign
> > to download the 
> > the program to your PC instead of running the program
> to
> > get output.
> > 
> > Might be worth checking it out.
> > 
> > The content-type being the problem seems unlikely. If
> > content-type is 
> > missing, I'd expect the server to return an error, not
> > open up a download 
> > window!  The symptom would fit it giving the WRONG
> > content-type, but that 
> > seems unlikely if you haven't changed the programs.  If
> > you want to see 
> > exactly what content-type and other data is returned,
> you
> > can use TELNET 
> > to run the HTTP session manually.  Here's how:
> > 
> > a) Open up a "run" prompt on your PC (Start -> Run)
> > 
> > b) Type "telnet newsystem.example.com 80"  (to connect
> to
> > port 80 on the 
> > new system.... change the domain name as appropriate)
> > 
> > c) In the TELNET session type:
> > 
> >      GET /cgi-bin/MYPGM.PGM<enter>
> >      Host: newsystem.example.com<enter>
> >      <enter>
> > 
> > d) The server should respond with the document for
> > download, including the 
> > content-type.  If the content-type is wrong or missing,
> > then it could be 
> > that the CGI programs aren't setting it correctly.
> > 
> > 
> > > Now, it's been a long time since I played around with
> > CGIDEV2, but it
> > seems
> > > to me that I remember you had to have some
> environment
> > things set up for
> > it,
> > > or maybe a subsystem running for it?,  something in
> the
> > background. Maybe
> > it
> > > was just as simple as porting the CGIDEV2 service
> > programs?
> > 
> > You CAN set up a separate server instance for CGIDEV2,
> > but it's not 
> > necessary and I've always thought it was a bad idea
> since
> > it makes 
> > firewall management much more difficult, and requires
> > extra resources from 
> > your system.
> > 
> > A lot of people do this for testing.  That way, they
> can
> > take down the 
> > CGIDEV2 instance, and change it's parameters, and
> > experiment without 
> > affecting the main server.
> > 
> > But, it's certainly not a requirement.
> > 
> > -- 
> > This is the Web Enabling the AS400 / iSeries (WEB400)
> > mailing list
> > To post a message email: WEB400@xxxxxxxxxxxx
> > To subscribe, unsubscribe, or change list options,
> > visit:
> http://lists.midrange.com/mailman/listinfo/web400
> > or email: WEB400-request@xxxxxxxxxxxx
> > Before posting, please take a moment to review the
> > archives
> > at http://archive.midrange.com/web400.
> > 
> > 
> > 
> > 
> > 
> > -- 
> > This is the Web Enabling the AS400 / iSeries (WEB400)
> > mailing list
> > To post a message email: WEB400@xxxxxxxxxxxx
> > To subscribe, unsubscribe, or change list options,
> > visit:
> http://lists.midrange.com/mailman/listinfo/web400
> > or email: WEB400-request@xxxxxxxxxxxx
> > Before posting, please take a moment to review the
> > archives
> > at http://archive.midrange.com/web400.
> > 
> 
> Bradley V. Stone
> BVS.Tools
> www.bvstools.com
> -- 
> This is the Web Enabling the AS400 / iSeries (WEB400)
> mailing list
> To post a message email: WEB400@xxxxxxxxxxxx
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/mailman/listinfo/web400
> or email: WEB400-request@xxxxxxxxxxxx
> Before posting, please take a moment to review the
> archives
> at http://archive.midrange.com/web400.
> 
> 
> 
> 
> 
> -- 
> This is the Web Enabling the AS400 / iSeries (WEB400)
> mailing list
> To post a message email: WEB400@xxxxxxxxxxxx
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/mailman/listinfo/web400
> or email: WEB400-request@xxxxxxxxxxxx
> Before posting, please take a moment to review the
> archives
> at http://archive.midrange.com/web400.
> 

Bradley V. Stone
BVS.Tools
www.bvstools.com

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.