Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Help -- IIS cgi-bin assistance

We currently don't have a cgi-bin on our production servers and this is required for the itunesU.java and class files to execute for authentication. Are there any steps to have a cgi-bin created for me to drop the classes in so it will executve the java classes? We're using windows NT servers.

Thanks for your help!
Evan

MacBook Pro, Mac OS X (10.4.6)

Posted on Jun 12, 2007 1:16 PM

Reply
Question marked as Best reply

Posted on Jun 12, 2007 9:11 PM

Hi Evan,

The Java scripts do not require that you have a cgi-bin directory per se -- this is just the case for web servers like Apache. IIS (which is likely what you have running on your NT/2000/2003 servers) can run CGI. This TechNet doc from Microsoft explains how to setup CGI in IIS:

http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/bc0c4 729-e892-4871-b8f3-fcbf489f2f09.mspx?mfr=true
9 replies
Question marked as Best reply

Jun 12, 2007 9:11 PM in response to Evan Moore

Hi Evan,

The Java scripts do not require that you have a cgi-bin directory per se -- this is just the case for web servers like Apache. IIS (which is likely what you have running on your NT/2000/2003 servers) can run CGI. This TechNet doc from Microsoft explains how to setup CGI in IIS:

http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/bc0c4 729-e892-4871-b8f3-fcbf489f2f09.mspx?mfr=true

Jun 13, 2007 8:45 AM in response to richwolf

Hi Rich,

Although I mentioned "java" in my previous message, I believe Perl is the direction we would want to go in.

I saw in the link that you provided on microsoft.com that it says, "If your CGI program is written as a script, for example a Perl script, then you can give the directory either Execute permissions or Script permissions. To use Script permissions, the script interpreter must be marked as a script engine."

So, my question is the ITunesU.pl script just going to work if I drop it in the cgi-bin? I understand the script needs to contain our updated credentials for authention purposes.

Also, it notes in the same message that the "script interpreter must be marked as a script engine" so is this something I need to do since this is code already created by Apple?

Thanks again for your help!
Evan

Jun 13, 2007 10:13 AM in response to Evan Moore

Evan, we are also running a Perl script on IIS6. This is what I did to get things running:

1. Install ActivePerl. You can get it here- www.activestate.com

2. Once it's been installed, open IIS and connect to your webserver.

3. Under you server should be a folder named "Web Service Extensions". Just to be sure mark "Perl CGI Extension", "Perl ISAPI Extension", and "PerlEx ISAPI Extension" as "Allowed".

4. On your Webserver, create a folder called "cgi-bin". For security's sake, this should be outside of your "wwwroot" folder.

5. Back in IIS, right-click on your website, and select New->Virtual Directory.

6. When the wizard starts, click "next" then enter "cgi-bin" in the "alias" field. next

7. Enter the path to the "cgi-bin" folder you created in step 4. next

8. Check "Execute (such as ISAPI applications or CGI)" next, finish.

9. Now you can place the iTunesU.pl file in the folder you created in step 4, and access it at "http://www.website.edu/cgi-bin/iTunesU.pl"

NEXT

You'll need to install 2 Perl modules to run the Perl script.

1. Click Start -> Run, and type "cmd". This should open your command prompt.

2. at the command prompt type "ppm install Digest-SHA". This will update your Perl install with the hmac sha256hex algorithm you'll need.

3. at the command prompt type "ppm install http://theoryx5.uwinnipeg.ca/ppms/Crypt-SSLeay.ppd". This will install the SSLeay module you'll need.

That should get you up and running. I just went through all of this yesterday, so hopefully it'll work well for you too.

Tony

Jun 13, 2007 1:18 PM in response to Tony Wilsman

Tony >> Thank you for the detailed instructions to configure IIS for CGI, ActivePearl and the modules. We were able to test everything you provided and it worked perfectly. I'm certain your instructions will be very benefitial to others who have the same questions!

Rich >> Thank you for responding when you did. Your response pointed me in the right direction to want to have perl instead of java on IIS. Thanks again.

Evan

Jun 14, 2007 7:23 AM in response to Evan Moore

Evan,

I ran into another problem this morning. Whenever a non-admin user (As in, they are not an administrator on the webserver) tried to access the transfer script they would get the error:

"LWP will support https URLs if the Crypt::SSLeay module is installed. More information at ."

I had to go into the c:\perl\bin folder and give Everyone read/execute access on the ssleay32.dll and libeay32.dll files.

It might save you a headache in the future.

Mac Mini Mac OS X (10.4.9) Dual Boot w/XP

Feb 11, 2008 7:46 AM in response to Tony Wilsman

I was going back and doing this again on a new computer and I used the uwinnipeg hack just like other folks have written here. This time, I couldn't get their repo to work correctly. I dug into the specification and found that they reference the repo http://www.bribes.org/perl/ppm/. I added that to my ppm repos and installed the Crypt-SSLeay lib from there. Hope this saves someone some time.

Help -- IIS cgi-bin assistance

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.