You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Joshua Slive <jo...@slive.ca> on 2003/12/16 21:22:47 UTC

Re: [users@httpd] Executing CGI Scripts that have no File Extension in Apache 1.3

On Tue, 16 Dec 2003 cebast@bellsouth.net wrote:

>   I have exhausted myself trying to figure out how to get CGI scripts to
> execute under Apache 1.3 that do not have a file extension. Granted I am
> brand spanking new at trying to setup Apache. I inherited this situation
> when our 2 Web Site Admins left the company. The Browser keeps asking if
> I want to download the file when I call it. So by my understanding the
> Mime section is not handling it correctly.  I am not sure how to
> represent a file with no extension in the AddHandler directive.  If I
> remove the AddHandler and just use the ScriptAlias no scripts execute.

Neither an AddHandler nor an "Options ExecCGI" are necessary when using
ScriptAlias.  It does all that itself.

First thing to check: if you actually download the file and look inside,
do you see the source-code or the output of the cgi script?  If you see
the output, then the script is running find and the problem is the
content-type that your script is sending.

>     ScriptAlias /cgi-bin/        "/webserver/cgi-bin/"

Is /webserver really a directory off the root of your filesystem or is it
off the ServerRoot or DocumentRoot directory.  It should be the filesystem
root for this to work.

>     <Directory "/webserver/cgi-bin">
>         AllowOverride None
>         Options All MultiViews FollowSymlinks
>         Options +ExecCGI

As I said, the ExecCGI is not necessary.  In addition, it is clear you
haven't read the documentation for Options, since those lines don't make
any sense.

>  AddHandler cgi-script pl

Again, that isn't necessary.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org