We help IT Professionals succeed at work.

How to set up a cgi-bin on windows 2000

Theany
Theany asked
on
Medium Priority
195 Views
Last Modified: 2013-12-25
How do we set up a cgi-bin on windows 2000? Is scripts directory the same as cgi-bin? Any suggestions will be very appreciated.

Thanks-
Comment
Watch Question

CERTIFIED EXPERT

Commented:
simple use IIS manager to grant the CGI directory execute permission. you may also need to grant the IUSR_<machine_name> user account execute permission on the directory if the volume is NTFS. put you executable/scripts in the directory and your off, if the CGI-BIN is not in the scope of any virtual directories then you may need to create a new virtual directory to point at it

Paul

Author

Commented:
Paul,
Right now I don't have a cgi-bin any where. Are you saying that I can create a cgi-bin as a virtual directory in the virtual website? Do I need to do this on both local and server or just the server? Please tell me.

Thanks-
CERTIFIED EXPERT

Commented:
i assume you already have iis installed, if so you need to do this on the server. create a directory called CGI-BIN in a current virtual directory or the wwwroot (this should be in the InetPub dir) and use the IIS mananger to grant the dir execute permissions

Author

Commented:
Paul,
Yes we do have iis installed.  Does cgi-bin have to be under our website directory which is under wwwroot? or it only has to be under wwwroot and doesn't have to be under the website? Please verify.

Thanks-
CERTIFIED EXPERT

Commented:
it can be where you like as long as it is in the scope of a virtual directory. strictly speaking you dont even need a CGi-BIN. if you want to run processing in a web server that need execute permissions (i.e. perl scripts and real executables .exe) then on IIS all you need to do is grant the directory where they are located execute permissions.

to do this

open the microsoft management console
right click on the folder where the scripts/programs are located
grant them execute permissions

if you have NTFS make sure the folder on the disk has execute permissions for the web server account, to do this use windows explorer and right click on the folder, go to permission on the last tab and grant the IUSR_<machine_name> account execute permission

Paul

Author

Commented:
Thanks Paul,
I will do it and let you know what happen in a couple of hours (I have to wait for my boss to come in to have access to server).

Theany

Author

Commented:
Paul,
I created cgi-bin dir under our website dir and gave  execute permission to the dir.  I also gave permission to IUSR_machine name execute permission.  Then I transferred search (perl cgi) scripts to cgi-bin.  When I tried to do search it gave me an error:

%1 is not a valid win32 application

What does it mean? Is this because it doesn't recognize perl script or something else?
Please help.

Thanks-

 
CERTIFIED EXPERT
Commented:
you need to add configuration to teh directory in IIS manager so that it nows to run .pl and .cgi through the perl engine/interpreter.

go to properties of the website , home directory tab, then click on the configuaration button and add an application mapping, you need to map .pl and .cgi to the perl execuatble, make on seperate entry for each extension

Author

Commented:
Thank you Paul, I got it working thanks to your help.

Theany

Explore More ContentExplore courses, solutions, and other research materials related to this topic.