exec cgi in apache 1.3.1

Ryan Bloom rbbloom na us.ibm.com
Pátek Září 25 17:19:25 CEST 1998


In article <6ug89s$ji$1 na nnrp1.dejanews.com>, postmaster na truevision.net 
says...
> 
> 
>   sevo na inm.de wrote:
> > "Options Includes", just as in .htaccess. To repeat it: Anything that
> > can go inside a .htaccess file (and some more) can go inside a directory
> > context.
> 
> I do it, but the SSI "exec cgi" don't work.
> My perl script work with: "perl counter.pl", but with exec cgi inside an .html
> or .shtml do nothing.
> 
> I have the following lines in my access.conf:

I hope you have changed these for posting, because if not there are 
errors.  You CAN NOT have comments on the same line as directives.  If 
those comments are just to help us, please next time, put the comment 
above the line, because it helps us to see the files exactly as they 
appear on your computer.

> 
> <Directory /usr/local/www*>  #The .html or shtml files directory.
> Options All MultiViews
> AllowOverride All
> Allow from all
> </Directory>
> 
> <Directory /usr/local/www/*/cgi-bin*>  #The script directory.
> Options ExecCGI
> AllowOverride All
> </Directory>
> 
> And, in my srm.conf:
> 
> AddHandler cgi-script .cgi
> AddHandler cgi-script .pl
> AddHandler cgi-script .exe
> Options +ExecCGI
> 
> AddType text/html .shtml
> AddHandler server-parsed .shtml
> 
> Thanks for helpme...

The SSI code you posted originally referenced was:

	<!--#exec cgi="/cgi-bin/counter.pl"-->

Two issues.  1)  Unless you have either an Alias, AliasMatch, or 
ScriptAlias directive to tell Apache that /cgi-bin/ maps to 
/the/proper/location, this won't work, because Apache doesn't know where 
to find the file.  You haven't included any of those directives, so I am 
assuming you don't have one.  2)  the --> at the end of the SSI command 
MUST have a space before it.  Without it, it is not a valid SSI command, 
refer the docs on mod_include that come with Apache, or SSI RFC.

Lastly, please tell us what your error_log says.  I have a feeling the 
problem will be either file not found, in which case, look at the 
preceding paragraph.

If none of this works, let us know.

Ryan

-- 
Ryan Bloom
rbbloom na us.ibm.com


Další informace o konferenci Linux