Step 3.1: Configuring IIS 7 Web Server on Windows Server 2008

IIS is not installed by default in some Windows installations.

To install IIS on Windows Server 2008:

Note: If you have IIS already installed, ensure that the CGI service is included.
To add this service to a current installation, go to Windows Server Manager and, in the left pane, select Roles. Then, in the main pane, scroll to Role services section, and click Add Role Services. In the wizard window that opens, select the CGI check box under the Application Development section. Click Next,and then click Install.
Linked JPEG File Template MT

Note: For more information on how to install IIS 7 on Windows 2008, refer to http://learn.iis.net/page.aspx/29/installing-iis7-on-windows-server-2008/.
The official Microsoft IIS website is http://www.iis.net.

To configure MTWeb as the default website in IIS:

  1. Open the IIS Manager from Windows Start > Administrative Tools > IIS Manager.
  2. In the IIS Manager Connections pane, expand the server name, expand Sites, and then click Default Web Site.

    Linked JPEG File Template MT

  3. Go to the Actions pane on the right, and under Edit Site, click Basic Settings…
    1. Click the button next to Physical path field, and select the WebRoot folder.

      Linked JPEG File Template MT
      For the default MassTransit installation, the path is:

      C:\Program Files (x86)\Acronis\MassTransit Server\MTWeb\WebRoot

    2. Click OK twice.
  4. In the Default Web Site Home pane, double-click the Handler Mappings icon.
    1. In the Actions pane, click Add Module Mapping…
    2. In the Request path field, enter: *.php.
    3. In the Module field, select: FastCgiModule.
    4. In the Executable (optional) field, select the path to the php-cgi.exe file. For example, C:\php\php-cgi.exe.
    5. In the Name field, enter: PHP.

      Linked JPEG File Template MT

    6. Click OK.
    7. If the following dialog appears, click Yes.

      Linked JPEG File Template MT

      Note: You must repeat steps 4.a through 4.g for each extension that you want to associate with PHP scripts. Extensions such as .php3 may be required for legacy applications, but are not necessary for MassTransit.

  5. In the IIS Manager Connections pane, click Default Web Site. Then double-click MIME Types in the Home pane.
    1. In the Actions pane, click Add...
    2. In the File name extension field, enter: .dmg.
    3. In the MIME type field, enter: x-application/applediskimage.

      Linked JPEG File Template MT

    4. Click OK.
  6. In the IIS Manager Connections pane, click Default Web Site. Then double-click MIME Types in the Home pane.
    1. In the Actions pane, click Add...
    2. In the File name extension field, enter: .json.
    3. In the MIME type field, enter: application/json.

      Linked JPEG File Template MT

    4. Click OK.
  7. In the IIS Manager Connections pane, click Default Web Site. Then double-click Default Document in the Home pane.
    1. In the Actions pane, click Add…
    2. In the Name field, enter: index.php.
    3. Click OK.

      Linked JPEG File Template MT

    4. Move the index.php to the top by clicking Move Up in the Actions pane.
  8. Open the Command Prompt as an administrator.
    1. Navigate to the inetsrv folder, by entering the following command:

      cd C:\Windows\system32\inetsrv

      Note: Modify this path according to your actual Windows installation folder.

    2. To set the maximum allowed content length for the transferred files, enter the command below.

      appcmd set config /section:requestfiltering /requestlimits.maxallowedcontentlength:value

      If you are using the preconfigured php.ini file, set the value to 2147483647.

      If you are configuring this setting after upgrading MTWeb, replace this value with the same value (in bytes) that was set for the upload_max_filesize. For more information on this topic, refer to Step 2: Upgrading and Configuring PHP.

      Note: It is recommended to set this value to 2147483647 bytes (2GB). This is also the highest value that can be set for upload_max_filesize.

    3. To set the maximum allowed time for an HTTP transfer, enter the commands bellow. Replace value with a value greater than the maximum time in seconds that an HTTP transfer takes.

      appcmd set config /section:system.webServer/fastCgi /[fullPath='c:\php\php-cgi.exe'].ActivityTimeout:value

      appcmd set config /section:system.webServer/fastCgi /[fullPath='c:\php\php-cgi.exe'].RequestTimeout:value

      Note: It is recommended to set these values to 3600 (1 hour). This is also the highest value that can be set for ActivityTimeout

  9. Restart the IIS server, so that the changes made to PHP and IIS settings are properly loaded. To do so, go to the IIS Manager Connections pane, and click Default Web Site. Then, in the Actions pane, navigate to the Manage Web Site section, and click Restart.
  10. Restart the machine. This is required to ensure that all new settings for IIS and MassTransit are properly loaded, and to remove any cached versions of the old website that may be in the memory.