Bluehost.com Web Hosting $6.95

Apache: Can .EXE extension be appended to CGI-BIN URLs?

This is a discussion on Apache: Can .EXE extension be appended to CGI-BIN URLs? within the Windows Web Servers forums, part of the Web Server and Related Forums category; I'm porting an app for use with Apache (testing 2.0.50 on Win 2000) after successful implementation using ...


Go Back   Usenet Forums > Web Server and Related Forums > Windows Web Servers

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 08-19-2004
durb
 
Posts: n/a
Default Apache: Can .EXE extension be appended to CGI-BIN URLs?

I'm porting an app for use with Apache (testing 2.0.50 on Win 2000)
after successful implementation using the Xitami web server. The app
uses Delphi-created .exe scripts (console application mode).

Xitami allows me to leave off the .exe extension in the URLs. For
instance, if the file MyApp.exe is located at
\apache\cgi-bin\MyApp.exe, then the url...

http//www.mydomain.com/cgi-bin/MyApp

....causes the script to be executed. I kind of like the user not
seeing the .exe, so I wrote the app to omit it.

Now, Apache seems to want the .exe, as it returns a "file not found"
when it's missing.

My research of usenet brought up several instances of developers
trying to get Apache to *stop* appending .exe to their Perl file
names, but most of these posts where from '98, and I wasn't able to
glean much from the advice offered, so I'm not sure if that was just
an old Apache bug in the Windows version.

Anyone know if/how I can change the .conf file to achieve this?

Thanks in advance,

Mark
  #2 (permalink)  
Old 08-20-2004
Jim Patterson
 
Posts: n/a
Default Re: Apache: Can .EXE extension be appended to CGI-BIN URLs?

durb wrote:
> I'm porting an app for use with Apache (testing 2.0.50 on Win 2000)
> after successful implementation using the Xitami web server. The app
> uses Delphi-created .exe scripts (console application mode).
>
> Xitami allows me to leave off the .exe extension in the URLs. For
> instance, if the file MyApp.exe is located at
> \apache\cgi-bin\MyApp.exe, then the url...
>
> http//www.mydomain.com/cgi-bin/MyApp
>
> ...causes the script to be executed. I kind of like the user not
> seeing the .exe, so I wrote the app to omit it.
>
> Now, Apache seems to want the .exe, as it returns a "file not found"
> when it's missing.
>
> My research of usenet brought up several instances of developers
> trying to get Apache to *stop* appending .exe to their Perl file
> names, but most of these posts where from '98, and I wasn't able to
> glean much from the advice offered, so I'm not sure if that was just
> an old Apache bug in the Windows version.
>
> Anyone know if/how I can change the .conf file to achieve this?


If you only need to do this for a fixed number of CGI's, then you can
just use an aliase for each one e.g.

Alias /cgi-bin/MyApp /cgi-bin/MyApp.exe

Something more general is tricker, as without using the extension there
is no syntactic way to tell that it's a CGI program. If your CGI
programs are always in their own directory (like /cgi-bin) , you could
use AliasMatch to add a .exe extension to anything in that directory
that doesn't have one. E.g.

AliasMatch /([^./]*)$ /$1.exe

(I haven't tried this, but I see no reason that it won't work).

--
Jim Patterson
Ottawa, CANADA
  #3 (permalink)  
Old 10-09-2004
DvDmanDT
 
Posts: n/a
Default Re: Apache: Can .EXE extension be appended to CGI-BIN URLs?

There is a command that allows you do skip the extensions for all files, and
that *might* work in your case as well.. I have not really understood what
causes this behaviour yet, but it could possibly be Options MultiViews since
I haven't really understood the meaning of it.. Could also be like mod_mime
or mod_mime_magic.. Could be something completely different as well.. But
yea, check it out..

--
// DvDmanDT
MSN: dvdmandt€hotmail.com
Mail: dvdmandt€telia.com
"durb" <durbjunk@aol.com> skrev i meddelandet
news:4659a9a.0408191128.7b49b693@posting.google.co m...
> I'm porting an app for use with Apache (testing 2.0.50 on Win 2000)
> after successful implementation using the Xitami web server. The app
> uses Delphi-created .exe scripts (console application mode).
>
> Xitami allows me to leave off the .exe extension in the URLs. For
> instance, if the file MyApp.exe is located at
> \apache\cgi-bin\MyApp.exe, then the url...
>
> http//www.mydomain.com/cgi-bin/MyApp
>
> ...causes the script to be executed. I kind of like the user not
> seeing the .exe, so I wrote the app to omit it.
>
> Now, Apache seems to want the .exe, as it returns a "file not found"
> when it's missing.
>
> My research of usenet brought up several instances of developers
> trying to get Apache to *stop* appending .exe to their Perl file
> names, but most of these posts where from '98, and I wasn't able to
> glean much from the advice offered, so I'm not sure if that was just
> an old Apache bug in the Windows version.
>
> Anyone know if/how I can change the .conf file to achieve this?
>
> Thanks in advance,
>
> Mark



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 10:59 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0