<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: CGI problem with CSWS in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/cgi-problem-with-csws/m-p/4500331#M17280</link>
    <description>Please post (attach) the (whole) HTTPD.CONF file.&lt;BR /&gt;&lt;BR /&gt;When "No entry is made in the access_log, error_log, or cgi_log files", is that no entries are made for anything, or is that no entries for (just) the CGI requests?&lt;BR /&gt;&lt;BR /&gt;Are the directory ownership and protection settings correct, from the CGI directory all the way up?  The upper levels will need at least execute-only access, or read-execute, for the Apache user.&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Fri, 18 Sep 2009 18:33:11 GMT</pubDate>
    <dc:creator>Hoff</dc:creator>
    <dc:date>2009-09-18T18:33:11Z</dc:date>
    <item>
      <title>CGI problem with CSWS</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/cgi-problem-with-csws/m-p/4500323#M17272</link>
      <description>Hi, I've been assigned the task of tracking down a problem with our Apache (version Apache/2.0.52) install on OpenVMS. The server seems to work fine, and I can access regular html files fine. However cgi scripts don't seem to work at all. When you enter a URL into the browser, or through a telnet session, you get nothing at all back. No entry is made in the access_log, error_log, or cgi_log files.&lt;BR /&gt;&lt;BR /&gt;In our httpd.conf we have the default cgibin directory specified:&lt;BR /&gt;&lt;BR /&gt;ScriptAlias /cgi-bin/ "/apache$root/cgi-bin/"&lt;BR /&gt;&lt;BR /&gt;I have made sure that the directory is marked as [rwe, rwe, rwe, rwe] in terms of file protection. Ditto for the actual files inside that I'm trying to execute. The files will run from a command line, and output the expected text.&lt;BR /&gt;&lt;BR /&gt;The directory spec in the conf file is as follows:&lt;BR /&gt;&lt;BR /&gt;&lt;DIRECTORY&gt;&lt;BR /&gt;    AllowOverride None&lt;BR /&gt;    Options None&lt;BR /&gt;    Order allow,deny&lt;BR /&gt;    Allow from all&lt;BR /&gt;&lt;/DIRECTORY&gt;&lt;BR /&gt;&lt;BR /&gt;Loglevel is set at "debug"&lt;BR /&gt;&lt;BR /&gt;suExec is *not* enabled if this matters.&lt;BR /&gt;&lt;BR /&gt;I've installed Apache on unix and windows machiens before without a hitch, so I'm completely lost as to what's going on, and I'm not very familiar with OpenVMS. &lt;BR /&gt;&lt;BR /&gt;Any help would be most appreciated!&lt;BR /&gt;&lt;BR /&gt;Thanks &lt;BR /&gt;&lt;BR /&gt;Jim&lt;BR /&gt;</description>
      <pubDate>Fri, 18 Sep 2009 14:48:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/cgi-problem-with-csws/m-p/4500323#M17272</guid>
      <dc:creator>Jim Crafton</dc:creator>
      <dc:date>2009-09-18T14:48:24Z</dc:date>
    </item>
    <item>
      <title>Re: CGI problem with CSWS</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/cgi-problem-with-csws/m-p/4500324#M17273</link>
      <description>&lt;!--!*#--&gt;&amp;gt; [...] [rwe, rwe, rwe, rwe] [...]&lt;BR /&gt;&lt;BR /&gt;This looks like a very bad idea, but&lt;BR /&gt;otherwise it all looks about like mine.&lt;BR /&gt;Around here (old version, 1.x):&lt;BR /&gt;&lt;BR /&gt;alp $ dire /owne /prot APACHE$COMMON:[000000]CGI-BIN&lt;BR /&gt;&lt;BR /&gt;Directory APACHE$COMMON:[000000]&lt;BR /&gt;&lt;BR /&gt;CGI-BIN.DIR;1        [AP_HTTPD,APACHE$WWW]            (RWE,RWE,,)&lt;BR /&gt;&lt;BR /&gt;alp $ dire /owne /prot APACHE$COMMON:[CGI-BIN];&lt;BR /&gt;&lt;BR /&gt;Directory APACHE$COMMON:[CGI-BIN]&lt;BR /&gt;&lt;BR /&gt;AUTHOR.DLL;8         [AP_HTTPD,APACHE$WWW]            (RWED,RWED,RE,RE)&lt;BR /&gt;AUTHOR.EXE;8         [AP_HTTPD,APACHE$WWW]            (RWED,RWED,RE,RE)&lt;BR /&gt;[...]&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I don't know about this one, but some&lt;BR /&gt;programs refuse to deal with executables to&lt;BR /&gt;which anyone on the planet can write.</description>
      <pubDate>Fri, 18 Sep 2009 15:23:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/cgi-problem-with-csws/m-p/4500324#M17273</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2009-09-18T15:23:34Z</dc:date>
    </item>
    <item>
      <title>Re: CGI problem with CSWS</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/cgi-problem-with-csws/m-p/4500325#M17274</link>
      <description>Steven,&lt;BR /&gt;&lt;BR /&gt;Thanks, I know the global rwe permissions aren't good, but I've been just trying things to get it to work at all. At this point I'm giving up in defeat unless someone else points something out. Even the simplest DCL script fails to run, i.e. a file like this:&lt;BR /&gt;&lt;BR /&gt;test.cgi:&lt;BR /&gt;$write sys$output ""&lt;BR /&gt;$write sys$output "Hello World"&lt;BR /&gt;$write sys$output ""&lt;BR /&gt;$ exit&lt;BR /&gt;&lt;BR /&gt;Works from a command line, but then accessed via URL, nothing is sent back, and nothing appears to be executed, it's as if the request just disappears into a black hole (unix's /dev/null).</description>
      <pubDate>Fri, 18 Sep 2009 15:35:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/cgi-problem-with-csws/m-p/4500325#M17274</guid>
      <dc:creator>Jim Crafton</dc:creator>
      <dc:date>2009-09-18T15:35:57Z</dc:date>
    </item>
    <item>
      <title>Re: CGI problem with CSWS</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/cgi-problem-with-csws/m-p/4500326#M17275</link>
      <description>Reposting as ITRC (again) blew up.  Apparently ITRC decided I wasn't logged in, in mid-submit.  Go figure.&lt;BR /&gt;&lt;BR /&gt;Given the gremlins I see after the websites I manage, any directories that are owned by or that are otherwise writable by the web server is a Bad Idea.  A Very Bad Idea.  &lt;BR /&gt;&lt;BR /&gt;My preference is to use an ACE to grant the web server read access (or read and execute for the CGI pieces) to the web-related directories.  I use the same technique on the Unix boxes.&lt;BR /&gt;&lt;BR /&gt;As for your question, have a read through Neil Rieck's notes on OpenVMS Apache and Tomcat and such:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www3.sympatico.ca/n.rieck/docs/openvms_notes_apache.html" target="_blank"&gt;http://www3.sympatico.ca/n.rieck/docs/openvms_notes_apache.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Then (also) check the Apache server logs.&lt;BR /&gt;&lt;BR /&gt;If you're not specifically tied to Apache, then (like Unix offers nginx, lighttpd and such) OpenVMS has the WASD web server available:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://wasd.vsm.com.au/" target="_blank"&gt;http://wasd.vsm.com.au/&lt;/A&gt; &lt;BR /&gt;&lt;BR /&gt;I have some DCL CGI posted to my site, but Neil's stuff and the Apache logs should get you going.&lt;BR /&gt;&lt;BR /&gt;Stephen Hoffman&lt;BR /&gt;HoffmanLabs LLC</description>
      <pubDate>Fri, 18 Sep 2009 15:50:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/cgi-problem-with-csws/m-p/4500326#M17275</guid>
      <dc:creator>Hoff</dc:creator>
      <dc:date>2009-09-18T15:50:53Z</dc:date>
    </item>
    <item>
      <title>Re: CGI problem with CSWS</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/cgi-problem-with-csws/m-p/4500327#M17276</link>
      <description>I'll check out the link. Unfortunately, absolutely *nothing* is being written to any of the apache logs for any cgi URL request. So access_log, error_log, and cgi_log are all unchanged. I have set the logging level to "debug", so theoretically I should be getting pretty much everything. And for normal URL requests I do see entries made in the access_log or error_log (if it's a bogus url). But for anything in the cgi-bin directory, absolutely nothing. &lt;BR /&gt;Is there no way to tell if the file is being executed? &lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;&lt;BR /&gt;Jim</description>
      <pubDate>Fri, 18 Sep 2009 16:37:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/cgi-problem-with-csws/m-p/4500327#M17276</guid>
      <dc:creator>Jim Crafton</dc:creator>
      <dc:date>2009-09-18T16:37:36Z</dc:date>
    </item>
    <item>
      <title>Re: CGI problem with CSWS</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/cgi-problem-with-csws/m-p/4500328#M17277</link>
      <description>&lt;!--!*#--&gt;&amp;gt; [...] Unfortunately, absolutely *nothing*&lt;BR /&gt;&amp;gt; is being written to any of the apache logs&lt;BR /&gt;&amp;gt; for any cgi URL request. [...]&lt;BR /&gt;&lt;BR /&gt;Are you flushing the logs?  I'm still running&lt;BR /&gt;the older 1.x server, and it had a defect&lt;BR /&gt;where the obvious flush operation&lt;BR /&gt;&lt;BR /&gt;@ SYS$STARTUP:APACHE$STARTUP.COM FLUSH&lt;BR /&gt;&lt;BR /&gt;tended to lose log data, but&lt;BR /&gt;&lt;BR /&gt;@ SYS$STARTUP:APACHE$STARTUP.COM graceful&lt;BR /&gt;&lt;BR /&gt;is pretty effective.&lt;BR /&gt;&lt;BR /&gt;&amp;gt; Works from a command line, but then&lt;BR /&gt;&amp;gt; accessed via URL, nothing is sent back,&lt;BR /&gt;&lt;BR /&gt;Well, yeah, but it's not really sending back&lt;BR /&gt;a proper response, is it?  I seem to have an&lt;BR /&gt;&lt;BR /&gt;APACHE$COMMON:[CGI-BIN]TEST-CGI-VMS.COM&lt;BR /&gt;&lt;BR /&gt;which, I assume, came with the Web server,&lt;BR /&gt;and which works as expected.  If you don't&lt;BR /&gt;have one, let me know.&lt;BR /&gt;&lt;BR /&gt;&amp;gt; [...] I'm not very familiar with OpenVMS.&lt;BR /&gt;&lt;BR /&gt;For an explanation of what all that f$fao()&lt;BR /&gt;stuff is doing, try:&lt;BR /&gt;&lt;BR /&gt;HELP Lexicals F$FAO *&lt;BR /&gt;&lt;BR /&gt;In particular:&lt;BR /&gt;[...]&lt;BR /&gt;         Special formatting:&lt;BR /&gt;         !/        None           Inserts a carriage return and a line&lt;BR /&gt;                                  feed.&lt;BR /&gt;[...]&lt;BR /&gt;&lt;BR /&gt;I believe that the CR may be important in&lt;BR /&gt;HTTP.</description>
      <pubDate>Fri, 18 Sep 2009 17:18:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/cgi-problem-with-csws/m-p/4500328#M17277</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2009-09-18T17:18:50Z</dc:date>
    </item>
    <item>
      <title>Re: CGI problem with CSWS</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/cgi-problem-with-csws/m-p/4500329#M17278</link>
      <description>&lt;!--!*#--&gt;Oh, yeah.&lt;BR /&gt;&lt;BR /&gt;&amp;gt; Is there no way to tell if the file is&lt;BR /&gt;&amp;gt; being executed?&lt;BR /&gt;&lt;BR /&gt;It's DCL, so it could do things like create&lt;BR /&gt;a file, or send e-mail, or any number of&lt;BR /&gt;detectable things.</description>
      <pubDate>Fri, 18 Sep 2009 17:20:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/cgi-problem-with-csws/m-p/4500329#M17278</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2009-09-18T17:20:57Z</dc:date>
    </item>
    <item>
      <title>Re: CGI problem with CSWS</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/cgi-problem-with-csws/m-p/4500330#M17279</link>
      <description>Yes, I have the "TEST-CGI-VMS.COM" file, and again, it does run correctly from the interactive commandline, but when requested in a URL, nothing happens, no data is returned at all, and no data is written to any of the logs, no matter what I do in terms of trying to execute cgi scripts. &lt;BR /&gt;In the 2.x apache series the flush option is non-existant, and the graceful option, according to the start.com file, is used to gracefully restart the server. It didn't make any difference. &lt;BR /&gt;I have no doubt this will be something mind-numbingly obvious once I find it, but until then I'm up the creek without a paddle.&lt;BR /&gt;</description>
      <pubDate>Fri, 18 Sep 2009 18:07:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/cgi-problem-with-csws/m-p/4500330#M17279</guid>
      <dc:creator>Jim Crafton</dc:creator>
      <dc:date>2009-09-18T18:07:18Z</dc:date>
    </item>
    <item>
      <title>Re: CGI problem with CSWS</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/cgi-problem-with-csws/m-p/4500331#M17280</link>
      <description>Please post (attach) the (whole) HTTPD.CONF file.&lt;BR /&gt;&lt;BR /&gt;When "No entry is made in the access_log, error_log, or cgi_log files", is that no entries are made for anything, or is that no entries for (just) the CGI requests?&lt;BR /&gt;&lt;BR /&gt;Are the directory ownership and protection settings correct, from the CGI directory all the way up?  The upper levels will need at least execute-only access, or read-execute, for the Apache user.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 18 Sep 2009 18:33:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/cgi-problem-with-csws/m-p/4500331#M17280</guid>
      <dc:creator>Hoff</dc:creator>
      <dc:date>2009-09-18T18:33:11Z</dc:date>
    </item>
    <item>
      <title>Re: CGI problem with CSWS</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/cgi-problem-with-csws/m-p/4500332#M17281</link>
      <description>the cgi-bin directory is marked (rwe,rwe,rwe,rwe). Yes I'm aware this is bad, but for the moment I'm just trying to get the damn thing to work. &lt;BR /&gt;&lt;BR /&gt;No entries in the various log files are made for any cgi related request. A regular HTML request for a file from the htdoc dir will show as expected.&lt;BR /&gt;&lt;BR /&gt;I've attached the httpd.conf file.</description>
      <pubDate>Fri, 18 Sep 2009 19:10:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/cgi-problem-with-csws/m-p/4500332#M17281</guid>
      <dc:creator>Jim Crafton</dc:creator>
      <dc:date>2009-09-18T19:10:13Z</dc:date>
    </item>
    <item>
      <title>Re: CGI problem with CSWS</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/cgi-problem-with-csws/m-p/4500333#M17282</link>
      <description>Each directory has a protection setting (visible via the DIRECTORY /SECURITY command), as does each subdirectory, etc.  Which means you need to check the protections on CGI-BIN.DIR, and every directory in the path above it.  (The OpenVMS disk structures are completely different than those of the typical Unix file systems, so bear with me here...)&lt;BR /&gt;&lt;BR /&gt;On the local TARGET:: box...&lt;BR /&gt;&lt;BR /&gt;$ show log apache$common&lt;BR /&gt;   "APACHE$COMMON" = "TARGET$DKA100:[SYS0.SYSCOMMON.APACHE.]" (LNM$SYSTEM_TABLE)&lt;BR /&gt;$ &lt;BR /&gt;&lt;BR /&gt;Here, this means SYS0.DIR, SYSCOMMON.DIR, APACHE.DIR and CGI-BIN.DIR must all have at least EXECUTE, if not READ access.&lt;BR /&gt;&lt;BR /&gt;File and directory ownership is also subtly different than Unix, too.&lt;BR /&gt;&lt;BR /&gt;Please don't set the file ownership and the protections wide open here.   Ok, that was a reasonable test, and it didn't help, so please (re)set the protections correctly.  (The better way to test for that sort of stuff is usually with the OpenVMS security alarms; with enabling and monitoring the file access failure auditing or alarms via the SHOW AUDIT and SET AUDIT commands.)&lt;BR /&gt;&lt;BR /&gt;Here are the differences between your httpd.conf and one locally (that works)...&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;$ diff APACHE$COMMON:[CONF]HTTPD.CONF,SYS$LOGIN:X.X&lt;BR /&gt;************&lt;BR /&gt;File HTTPD.CONF;4&lt;BR /&gt;  155   #Listen 80&lt;BR /&gt;  156   Listen 10.1.2.1:80&lt;BR /&gt;  157   &lt;BR /&gt;******&lt;BR /&gt;File X.X;1&lt;BR /&gt;  156   Listen 80&lt;BR /&gt;  157   &lt;BR /&gt;************&lt;BR /&gt;************&lt;BR /&gt;File HTTPD.CONF;4&lt;BR /&gt;  437   #&lt;BR /&gt;******&lt;BR /&gt;File X.X;1&lt;BR /&gt;  437   ScriptLog logs/cgi_log &lt;BR /&gt;  438   &lt;BR /&gt;  439   #&lt;BR /&gt;************&lt;BR /&gt;************&lt;BR /&gt;File HTTPD.CONF;4&lt;BR /&gt;  442   LogLevel warn&lt;BR /&gt;  443   &lt;BR /&gt;******&lt;BR /&gt;File X.X;1&lt;BR /&gt;  444   LogLevel debug&lt;BR /&gt;  445   &lt;BR /&gt;  446   &lt;BR /&gt;************&lt;BR /&gt;************&lt;BR /&gt;File HTTPD.CONF;4&lt;BR /&gt;  562       Options None&lt;BR /&gt;  563       Order allow,deny&lt;BR /&gt;  564       Allow from all&lt;BR /&gt;  565   &lt;BR /&gt;******&lt;BR /&gt;File X.X;1&lt;BR /&gt;  565       Options ExecCGI&lt;BR /&gt;  566       Order allow,deny&lt;BR /&gt;  567       Allow from all&lt;BR /&gt;  568   #    AddHandler cgi-script .cgi .pl&lt;BR /&gt;  569   &lt;BR /&gt;************&lt;BR /&gt;************&lt;BR /&gt;File HTTPD.CONF;4&lt;BR /&gt;  890   #    Alias /error/ "apache$root/htdocs/error/"&lt;BR /&gt;  891   #&lt;BR /&gt;  892   #    &lt;DIRECTORY&gt;&lt;BR /&gt;  893   #        AllowOverride None&lt;BR /&gt;******&lt;BR /&gt;File X.X;1&lt;BR /&gt;  894   #    Alias /error/ "/apache$root/htdocs/error/"&lt;BR /&gt;  895   #&lt;BR /&gt;  896   #    &lt;DIRECTORY&gt;&lt;BR /&gt;  897   #        AllowOverride None&lt;BR /&gt;************&lt;BR /&gt;************&lt;BR /&gt;File HTTPD.CONF;4&lt;BR /&gt; 1006   Include /apache$root/conf/mod_php.conf&lt;BR /&gt;******&lt;BR /&gt;File X.X;1&lt;BR /&gt; 1010   Include /apache$common/conf/mod_perl.conf&lt;BR /&gt; 1011   Include /apache$root/conf/mod_php.conf&lt;BR /&gt; 1012   &lt;BR /&gt;************&lt;BR /&gt;...&lt;BR /&gt;DIFFERENCES /IGNORE=()/MERGED=1-&lt;BR /&gt;    HTTPD.CONF;4-&lt;BR /&gt;    X.X;1&lt;BR /&gt;&lt;BR /&gt;The CGI DCL also has the (poorly documented) APACHE$EXECUTE identifier assigned, if you're looking to override protections and ownerships.  In very, very loose terms, adding this identifier to the ACL on the object is very roughly akin to setting a Unix group ID on the files involved that allows the web server access.&lt;BR /&gt;&lt;BR /&gt;And for completeness, here's the invocation that I used to test this stuff:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://target.example.com/cgi-bin/test-cgi-vms.com" target="_blank"&gt;http://target.example.com/cgi-bin/test-cgi-vms.com&lt;/A&gt;&lt;BR /&gt;&lt;/DIRECTORY&gt;&lt;/DIRECTORY&gt;</description>
      <pubDate>Fri, 18 Sep 2009 23:01:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/cgi-problem-with-csws/m-p/4500333#M17282</guid>
      <dc:creator>Hoff</dc:creator>
      <dc:date>2009-09-18T23:01:00Z</dc:date>
    </item>
    <item>
      <title>Re: CGI problem with CSWS</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/cgi-problem-with-csws/m-p/4500334#M17283</link>
      <description>Add a line&lt;BR /&gt;&lt;BR /&gt;AddHandler cgi-script .cgi .com&lt;BR /&gt;&lt;BR /&gt;in your configuration, alignged with the other AddHandler lines (and not within  a &lt;DIRECTORY&gt; block).&lt;BR /&gt;&lt;BR /&gt;What happens now is that .COM is not recognized as a script so it won't be executed.&lt;/DIRECTORY&gt;</description>
      <pubDate>Wed, 23 Sep 2009 07:32:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/cgi-problem-with-csws/m-p/4500334#M17283</guid>
      <dc:creator>Willem Grooters</dc:creator>
      <dc:date>2009-09-23T07:32:50Z</dc:date>
    </item>
  </channel>
</rss>

