|
You should enable the error log and see what's in it. Here's some configuration directives that will turn on access and error logging and keep the logs for two weeks: LogFormat "%h %{Host}i %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\"" combined CustomLog logs/accesslog combined ErrorLog logs/errorlog LogMaint logs/accesslog 14 0 LogMaint logs/errorlog 14 0 If I'm not mistaken, header errors will show up in the error log. Also, if you start the server with -vv (two lower case V's), run the request, and end the server, it will do what essentially amounts to a comm trace and you'll be able to see exactly what it s passed in and what is returned. Additionally, this is most likely a problem with the content-type header (configuration errors typically show up as a 404 or 403 error). As has already been pointed out, the Original HTTP server would automatically set one if a CGI program didn't set it or mangled it badly. Apache doesn't do that but I think you can add a MIME type to it for .pgm objects (if you have CGI programs that generate something other than HTML, you'll want to check them after making this change). Matt -----Original Message----- From: web400-bounces@xxxxxxxxxxxx [mailto:web400-bounces@xxxxxxxxxxxx] On Behalf Of Shannon ODonnell Sent: Monday, May 15, 2006 12:12 PM To: 'Web Enabling the AS400 / iSeries' Subject: Re: [WEB400] CGIDEV Question 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. >
As an Amazon Associate we earn from qualifying purchases.
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.