Forum Moderators: phranque

Message Too Old, No Replies

Running a CGI app

         

shivakarsh

11:21 am on Dec 10, 2004 (gmt 0)

10+ Year Member



I've created my own cgi app. in VB. Now how do I configure apache to run my app for a certain extension?

Jazeker

11:36 am on Dec 10, 2004 (gmt 0)

10+ Year Member



Have a look at the ScriptAlias command in the default httpd.conf :

#
# 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/Apache/cgi-bin/"

#
# "C:/Program Files/Apache Group/Apache/cgi-bin" should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
<Directory "C:/Program Files/Apache Group/Apache/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>

</IfModule>

This way it will expect scripts in that dir.

Can't help you with VB specifics though...

shivakarsh

11:59 am on Dec 10, 2004 (gmt 0)

10+ Year Member



I've my own interpreter something like hello.exe. It's a CGi aPP. How can i run my interpreter for particular files somthing like .abc?

BlackDex

12:56 pm on Dec 10, 2004 (gmt 0)

10+ Year Member



You have to add the exe file to the beginning of the file like this.

#!/path/to/your/app.exe

#
#The rest of the code goes here
#