Re: [users@httpd] Apache not treating .EXE as CGI

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Joshua,

Thanks for the hint with ordering the Alias directives. Oddly enough, I
left my configuration unchanged, did a reboot, and the .EXEs work fine,
now. I'm not clear on whether the service Restarts I did on the Apache
service weren't sufficient before, or whether shutting Mozilla down
completely (a side effect of the reboot) instead of doing a forced Reload
(Ctrl-Reload) did the trick.

In any case, my current configuration (see below, or see previous content
in this thread) is working fine -- with AddHandler left in place, in spite
of the NIST installation directions.

BTW: I didn't notice anything in the Apache manual indicating order and
specificity concerns, especially in regards to Alias in conjunction with
ScriptAlias. Is this undocumented behavior?

Cheers,
Steve


[Alias and ScriptAlias that is now working with no changes, as if by magic]

#
# Aliases: Add here as many aliases as you need (with no limit). The format
is
# Alias fakename realname
#
# Note that if you include a trailing / on fakename then the server will
# require it to be present in the URL.  So "/icons" isn't aliased in this
# example, only "/icons/".  If the fakename is slash-terminated, then the
# realname must also be slash terminated, and if the fakename omits the
# trailing slash, the realname must also omit it.
#
# We include the /icons/ alias for FancyIndexed directory listings.  If you
# do not use FancyIndexing, you may comment this out.
#
Alias /icons/ "C:/Program Files/Apache Group/Apache2/icons/"
<Directory "C:/Program Files/Apache Group/Apache2/icons">
    Options Indexes MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>

### WebCAT ###
##############
Alias /WebTools "C:/WebMetrics/WebTools"

#
# This should be changed to the ServerRoot/manual/.  The alias provides
# the manual, even if you choose to move your DocumentRoot.  You may
comment
# this out if you do not care for the documentation.
#
AliasMatch ^/manual(?:/(?:de|en|es|fr|ja|ko|ru))?(/.*)?$ "C:/Program
Files/Apache Group/Apache2/manual$1"
<Directory "C:/Program Files/Apache Group/Apache2/manual">
    Options Indexes
    AllowOverride None
    Order allow,deny
    Allow from all
    <Files *.html>
        SetHandler type-map
    </Files>
    SetEnvIf Request_URI ^/manual/(de|en|es|fr|ja|ko|ru)/
    prefer-language=$1
    RedirectMatch 301 ^/manual(?:/(de|en|es|fr|ja|ko|ru)){2,}(/.*)?$
    /manual/$1$2
</Directory>
#
# ScriptAlias: This controls which directories contain server scripts.
# ScriptAliases are essentially the same as Aliases, except that
# documents in the realname directory are treated as applications and
# run by the server when requested rather than as documents sent to the
client.
# The same rules about trailing "/" apply to ScriptAlias directives as to
# Alias.
#
ScriptAlias /cgi-bin/ "C:/Program Files/Apache Group/Apache2/cgi-bin/"
#
# "C:/Program Files/Apache Group/Apache2/cgi-bin" should be changed to
whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
<Directory "C:/Program Files/Apache Group/Apache2/cgi-bin">
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all
</Directory>

### WebCAT ###
##############
ScriptAlias /WebTools/WebCAT/cgi-bin/
"C:/WebMetrics/WebTools/WebCAT/cgi-bin/"
<Directory "C:/WebMetrics/WebTools/WebCAT/cgi-bin">
    AllowOverride None
    Options ExecCGI
    AddHandler cgi-script .exe
    Order allow,deny
    Allow from all
</Directory>




-----Joshua Slive <jslive@xxxxxxxxx> wrote: -----


To: users@xxxxxxxxxxxxxxxx
From: Joshua Slive <jslive@xxxxxxxxx>
Date: 2005-05-18 03:54PM
Subject: Re: [users@httpd] Apache not treating .EXE as CGI

[ Wow... Nasty email program you've got.  HTML only and quite mangled.
Please send in plain text.]

On 5/18/05, shenty@xxxxxxxxxxxx wrote:
>
> Hi all,
>
> Question from a newbie. I have Apache 2.0.52 for Win32 installed locally
on
> Windows XP, SP2. I'm trying to run a set of CGI .EXEs (that's Windows
> executables, not Perl scripts or similar) from NIST. The instructions
from
> the NIST install read as follows about setting up a ScriptAlias in
Apache:
>  However, any reference to one of the .EXEs in the ".../cgi-bin/"
> directory results in the browser trying to download the EXE rather than
> Apache running it as a CGI program.
>
> This occurs in both Mozilla and IE, and both browsers report the .EXE as
a
> MIM type "application/octet" -- so it appears Apache isn't getting the
> message that it should *run* the EXEs in that directory, rather than
> download them. I'm accessing the Apache server locally with a
> http://localhost... URL.

Two issues you need to look at:

1. If you download the file and look inside, is it really the binary,
or is it the output of the binary (sent with the wrong mime-type)?

2. You appear to have an Alias directive that overlaps with the
directory specfied by your ScriptAlias.  So your ScriptAlias is likely
being ignored.  The more specific Alias needs to be listed first.
(But given the specific AddHandler and Options directives, this
shouldn't be the cause of your problem.)

Joshua.

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


---------------------------------------------------------------------
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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux