You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Rafael del Aguila <ra...@gmail.com> on 2006/10/05 11:50:37 UTC

[users@httpd] How to invoke CGI program without using its file extension?

Hi,

I'd like to know how can Apache2 run a cgi program without using its file
extension.

In my Apache 1.3 (on Windows 2K) I can use
http://my.server.com/cgi-bin/program.exe?Parameter=Value.....<http://my.server.com/cgi-bin/program.exe?Parameter=Value>
or
http://my.server.com/cgi-bin/program?Parameter=Value......<http://my.server.com/cgi-bin/program.exe?Parameter=Value>
to execute a .exe cgi program, and both urls work ok.

But in Apache2 (installed on the same server)
http://my.server.com/cgi-bin/program?Parameter=Value.....<http://my.server.com/cgi-bin/program.exe?Parameter=Value>
fails with
error 404 Not Found
The requested URL /cgi-bin/program was not found on this server.

However
http://my.server.com/cgi-bin/program.exe?Parameter=Value.....<http://my.server.com/cgi-bin/program?Parameter=Value>
works ok

Why? Was it a bug in 1.3 realese? Is it a configuration issue?

I would like to run cgi program without using its file extension.


Thanks in advance for your help.

Re: [users@httpd] How to invoke CGI program without using its file extension?

Posted by Joshua Slive <jo...@slive.ca>.
On 10/6/06, Rafael del Aguila <ra...@gmail.com> wrote:

>  I were not using this options in Apache 1.3, perhaps the default behaviour
> are diferent in both releases.

No.  More likely you had these options set elsewhere in your config
and they were inherited into this directory.

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


Re: [users@httpd] How to invoke CGI program without using its file extension?

Posted by Rafael del Aguila <ra...@gmail.com>.
Ok, I get it!

In Apache2 config file I need to add in the cgi-bin Directory section the
following directives:

Options MultiViews
AddHandler cgi-script exe

With these directives I can run a cgi program (.exe) without using its file
extension.

I were not using this options in Apache 1.3, perhaps the default behaviour
are diferent in both releases.

Thanks.


On 05/10/06, Joshua Slive <jo...@slive.ca> wrote:
>
> On 10/5/06, Rafael del Aguila <ra...@gmail.com> wrote:
> > Hi,
> >
> >  I'd like to know how can Apache2 run a cgi program without using its
> file
> > extension.
> >
> > In my Apache 1.3 (on Windows 2K) I can use
> > http://my.server.com/cgi-bin/program.exe?Parameter=Value.....
> > or
> > http://my.server.com/cgi-bin/program?Parameter=Value......
> > to execute a .exe cgi program, and both urls work ok.
> >
>
> It sounds like you were using "Options Multiviews" in 1.3.
>
> 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
>
>

Re: [users@httpd] How to invoke CGI program without using its file extension?

Posted by Joshua Slive <jo...@slive.ca>.
On 10/5/06, Rafael del Aguila <ra...@gmail.com> wrote:
> Hi,
>
>  I'd like to know how can Apache2 run a cgi program without using its file
> extension.
>
> In my Apache 1.3 (on Windows 2K) I can use
> http://my.server.com/cgi-bin/program.exe?Parameter=Value.....
> or
> http://my.server.com/cgi-bin/program?Parameter=Value......
> to execute a .exe cgi program, and both urls work ok.
>

It sounds like you were using "Options Multiviews" in 1.3.

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


Re: [users@httpd] How to invoke CGI program without using its file extension?

Posted by Steve Swift <st...@gmail.com>.
If you want to run a cgi program without using its extension you should look
into using the ScriptAlias or ScriptAliasMatch directives.

On 05/10/06, Rafael del Aguila <ra...@gmail.com> wrote:
>
> Hi,
>
> I'd like to know how can Apache2 run a cgi program without using its file
> extension.
>
> In my Apache 1.3 (on Windows 2K) I can use
> http://my.server.com/cgi-bin/program.exe?Parameter=Value.....
> <http://my.server.com/cgi-bin/program.exe?Parameter=Value>
> or
> http://my.server.com/cgi-bin/program?Parameter=Value......
> <http://my.server.com/cgi-bin/program.exe?Parameter=Value>
> to execute a .exe cgi program, and both urls work ok.
>
> But in Apache2 (installed on the same server)
> http://my.server.com/cgi-bin/program?Parameter=Value.....<http://my.server.com/cgi-bin/program.exe?Parameter=Value>
> fails with
> error 404 Not Found
> The requested URL /cgi-bin/program was not found on this server.
>
> However
> http://my.server.com/cgi-bin/program.exe?Parameter=Value.....<http://my.server.com/cgi-bin/program?Parameter=Value>
> works ok
>
> Why? Was it a bug in 1.3 realese? Is it a configuration issue?
>
> I would like to run cgi program without using its file extension.
>
>
> Thanks in advance for your help.
>
>


-- 
Steve Swift
http://www.swiftys.org.uk