running applications build under Cygwin

Brian Dessent brian@dessent.net
Sun Aug 28 14:28:00 GMT 2005


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/



More information about the Cygwin mailing list