Configuring a CGI environment under Windows2003

xiaoxiao2021-03-05  19

Configuring a CGI environment under Windows2003

Recently, because of the forum of the CGI script of a buddy - is also the Leo Forum, put it on the Windows2003 server, spent some time to study the support of the CGI environment under Windows2003. Online IIS Configuring CGI's information, but specifically speaking, the configuration of Windows2003 comes with IIS6 is relatively small, and now you will finish your experience, I hope to help other brothers needed.

First, software preparation

Ø Install IIS6, this Windows2003 is installed on the line, and there is no Windows installation disk to reinstall OK.

Ø Install ActivePerL Download: Domestic: http://down.mckj.Net/web/activeperl-5.6.0.615-mswin32-X86-MULTI-THREAD.MSI, this is prepared for supporting CGI and Perl. Run the downloaded ActivePerL step by step. Note: Installation path Please select / usr / under the root directory (it is best to use C: USR), so that you have saved the future debugging procedure, everyone said, I am not particularly familiar with Perl, let's do it, I It is installed to the C: USR directory, there is no problem after debugging. So, for Perl unkreeding friends, it is best to use C: USR to install

Second, configure IIS, add new sites

Assume that we have to configure the website name that supports the CGI is Test.kunxu.com, where the website file is stored in the D: Test directory. Below, let's step in step, first add Test.kunxu.com website, then let this website support the CGI script.

1. Control Panel à Administration Tools àInternet Information Service (IIS) Manager, open IIS Manager.

2, click right click on the website, new à website:

3. In the pop-up website creation wizard, enter "Test.kunxu.com" in the website description, click "Next".

4. In the IP address and port configuration in the website creation wizard, the IP address fills your machine's IP address, the port fills the port you accessed, the default is 80, click "Next".

5. Enter "D: Test" in the path in the home directory, click "Next".

6. In website access, select "Perform (such as ISAPI Application or CGI) (E)", click "Next".

7. Click "Finish", here, add a "Test.kunxu.com" website to this.

Third, configure IIS, let the website support CGI

Website Test.kunxu.com has been added to the server and now let it support the CGI script.

1. Select Test.kunxu.com, right key "Properties" in the website in the IIS Manager.

2. In the pop-up attribute card, click "Main Directory". In the Main Direct Capacity tab, select Script Resource Access, Record Access, Read, Index Resources, and then click Configure.

3. In the pop-up application configuration window, click "Add".

4, in the pop-up window. The "C: USRBINPERL.EXE% S% S% S" ", extension filled" .cgi ", action selection", "Script Engine", "Confirm that the file is existing". Note: "%%" After S% S, must be added to double quotation marks - "" "becomes"% s% s ", otherwise the configuration will not succeed. Extended" .cgi ", the purpose is to support .cgi scripts.

After the increase is successful, the application extension will add a ".cgi" item.

5. A ".pl" item is added to the 3rd, 4 steps. The "C: USRbinperl.exe% S% S% S", the extension is filled ".pl", the action is selected, "Script Engine", "Confirm the file is existing". Note: "% After S% S, be sure to add two quotes - "" "to"% s% s "", otherwise the configuration will not succeed. Extended ".pl", the purpose is to support .erl script, this is because Most of the CGI scripts may call the Perl script. After the increase is successful, the application extension will add a ".pl" item.

6. Open the system's allowing CGI environment

The website that is already able to support the CGI script here, but pay attention to allow the IIS server to allow the CGI environment.

Open IIS Manager à Left button "Web Service Extension" à selected "All CGI Extensions" à Click Allow:

Datual!

转载请注明原文地址:https://www.9cbs.com/read-38646.html

New Post(0)