| Home > Lecture Notes > CGI Config |
| Check the box for Internet Information Server (IIS); click the "Details..." button to select IIS components: |
|
| These are the components I installed, however you should not need FTP or SMTP if you only want to test CGI scripts: |
|
|
| server_test.html in the default server directory C:\Inetpub\wwwroot\ |
<html> <head> <title>Server Test</title> <!-- server_test.html --> </head> <body> The server is working </body> </html> |
| If the IIS is installed and working you should see your test document displayed in the browser: |
|
| Right-click and select Start or Stop as required to start or stop services. |
![]() |
|
Click on Default Web Site in the left pane to
expand all the items in the right pane; right-click on
the Scripts folder and select Properties; Click the "Create" button in the Virtual Directory tab so that the "Configuration" button is available (the "Create" button will change to "Remove": |
![]() |
| Select the .pl extension and click the "Edit" button or, if no Perl extensions were listed, click the "Add" button. |
![]() |
|
Edit or Add a new Application Extension Mapping as
follows: |
![]() |
| Create a simple Perl script named cgi_test.pl in C:\Inetpub\Scripts\ as follows: |
#!/usr/bin/perl -T
# cgi_test.pl
use warnings;
print "content-type: text/html\n\n";
# Important! extra blank line after header
print "CGI is working";
|
|
If CGI and the Perl script are working you should see
the following displayed in the browser: |
![]() |
|
Right-click on the shortcut, select properties, and
check the "Advanced" button. Check "Run with different credentials" |
![]() |
| When you use the shortcut you will be prompted for the user account and password to run the application. The default is Administrator, which is usually what you want. |
![]() |
| Choose a Virtual Directory Alias (this will be the path following the LOCALHOST domain: http://localhost/usr-cgi |
![]() |
| Choose a Web Site Content Directory where you have access from your normal user account. |
![]() |
| When you get to the Access Permissions step in the Wizard be sure to check the "Execute..." box in addition to the Read and Run boxes already checked by default. |
![]() |