httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ron Wingfield" <dtc...@ionet.net>
Subject Re: CGI and ScriptAlias Alternatives
Date Tue, 04 Jun 2002 05:00:22 GMT
Well, I've tried some things.  My question, now, is regarding the syntax of a call to the global
perl script.  Keep in mind that the counters.pl script that I'm trying to execute is outside,
or on top of the VirtualHost's DocumentRoot (refer back to my original directory structure).
 So, if you're sitting there, positioned, viewing the /www/vhosts/apples.com/index.htm page,
. . .having expected this page to have received the output of a perl script, located above
in the /www/cgi-bin/perl/counters.pl, . . .then how (for test purposes) would you specify
it (the perl script) as an address typed into the address line of MS/Explorer, NetScape, etc.?
  Again, keep in mind that this script is in a directory above the DocumentRoot of the VirtualHost.
 In other words, in my example, the counters.pl script is in the /www/cgi-bin/perl directory
of my primary server's DocumentRoot.  Apples.com is a VirtualHost.

Also, isn't the "#include virtual" instruction designed to dynamically copy html code into
a parent html document, at execution time, resulting in a virtually expanded html document.
 I guess I'm puzzled as to how merging-in  perl-script is going to cooperate with the html.
 I'm just an old programmer, but I am still inclined to want to execute something. . ., regardless,
if there is a better way. . .  Does the "include virtual" path leading to an executable, cause
Apache to automagically execute the (perl) script?
  ----- Original Message ----- 
  From: Joshua Slive 
  To: users@httpd.apache.org 
  Sent: Monday, June 03, 2002 9:33 PM
  Subject: Re: CGI and ScriptAlias Alternatives


  Ron Wingfield wrote:

  > I'm having difficulty executing the counter.pl in the common directory.  
  > If I add a ScriptAlias, e.g.,
  >  
  >   ScriptAlias /cgi-bin/   "/www/cgi-bin/perl/"
  >  
  > to the httpd.conf container for the VirtualHost, apples.com.
  >  
  > 
  > After execution of the index.htm file in the host's DocumentRoot 
  > directory, /www/vhosts/apples.com (as directed in the httpd.conf file), 
  > the error-log message contains:  "invalid CGI ref 
  > "www/cgi-bin/perl/counter.pl".  

  This sounds conspicuously like you are using SSI, not direct CGI.  The 
  error message is from the SSI.

  Start by requesting the cgi script directly (as in 
  http://example.com/cgi-bin/perl/counter.pl) and make sure that works.

  Once that works, then try to get it to work in SSI.  Forget about "#exec 
  cgi".  You should never use that.  Instead, use <!--#include 
  virtual="/cgi-bin/perl/counter.pl" -->.

  Joshua.


  ---------------------------------------------------------------------
  To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
  For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message