delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/08/28/10:28:15

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <4311CAD6.E399C2C1@dessent.net>
Date: Sun, 28 Aug 2005 07:31:50 -0700
From: Brian Dessent <brian AT dessent DOT net>
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: running applications build under Cygwin
References: <BAY110-F12B6B221706543F140FE70BBAC0 AT phx DOT gbl>
X-IsSubscribed: yes
Reply-To: cygwin AT cygwin DOT com

Floris Bos wrote:

> However when I call Omega.exe from my browser window I get the following
> error:
> This program cannot be run in DOS mode
> 
> Along with that all of the code of the executable is displayed in my browser
> window.

Your problem is that your web server is just returning the executable as
a regular file and your browser is displaying it.  (You get much the
same effect if you type "less omega.exe".)  You need to configure your
web server's so that it actually executes the binary and doesn't try to
display it as a file.

You didn't mention what web server you are using so I can't be of any
more help.  Cygwin has packages for two versions of Apache as well as
lighttpd, and you will probably get best results using one of these. 
But it isn't necessary, as long as whatever server you use can handle
running CGI programs.

However, setting up a web server is not really on-topic for this list
because it's not cygwin specific.  If you are using Apache, you would
normally either use the "ScriptAlias" parameter or the "Options
+ExecCGI" parameter.  If you are using the Cygwin apache package you
should be able to just put your binary in /var/www/cgi-bin and call it
as http://localhost/cgi-bin/omega since this is the default CGI
directory.  If you are using a different package of Apache then put your
binary in whatever it's configured to use for its cgi-bin dir, or modify
your httpd.conf to reflect the location.  The apache manual and mailing
list will be of help.

Brian

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019