How to run Internet Information Services (IIS) in a Cloudhouse Container
22/07/2019 Cliff Hobbs ID: 396045
The purpose of this article is to detail how to run Microsoft's Internet Information Services (IIS) in a Cloudhouse Compatibility Container™.
IIS versions 6, 7, and 7.5 hosting web applications on legacy Microsoft Operating Systems (such as Windows Server 2003/2008), can be successfully migrated to newer OSs such as Windows Server 2016/2019, running a newer version of IIS (8.0/10.0) using Cloudhouse Containers.
There are two stages to achieve this:
- Stage 1: Creating a Container for the Web Application
- Stage 2: Configure IIS on the Target OS to work with the Legacy Container
Follow the steps below to create a Container for the legacy web application.
- Setup a vanilla build of the legacy OS.
- Install the IIS Application components.
- Install the Auto Packager as detailed in How to Install the Cloudhouse Auto Packager.
- Follow How to create a Cloudhouse Compatibility Container with the Auto Packager, installing and setting up the web application as you would typically do in the legacy OS. At the end of the packaging process, you will have a Cloudhouse Container that has captured the legacy web application.
- Follow Deploying Containers to copy and deploy the captured Container onto the modern OS.
Each website hosted by IIS belongs to an Application Pool. When HTTP makes a request to IIS, the Application Pool provides an IIS worker process (w3wp.exe) to serve the request. The steps below show how to intercept IIS at the worker process level, which allows us to apply our compatibility features to any code executed by each website and not IIS itself.
To intercept IIS at the worker process level:
- Create the following Registry file and apply it to the computer:
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\w3wp.exe] "Debugger"="\"C:\\ProgramData\\Cloudhouse\\ContainerFolder\\AppAcceleratorV.exe\" \"/wkdir=C:\\ProgramData\\Cloudhouse\\ContainerFolder\" /f"
The registry path in red above needs to be modified to point to where the Container was deployed in Stage 1.
- Next, edit the Default Web Site Site using the Internet Information Services (IIS) Manager application shortcut and ensure the Physical path is set to point to the wwwroot folder captured in the Container:
- Restart the Application Pool. The screenshot below shows the Start and Stop options available for the Default Applications Pool on Windows Server 2016 running IIS 10.0
- To confirm IIS is running as expected using the Container engine, open Internet Explorer (IE) on the IIS server. Then navigate to your web application and confirm this is displayed successfully.
The following screenshot (taken from Windows Server 2016 running IIS version 10.0) shows IIS running localhost successfully using the Cloudhouse redirection engine.
Monitoring tools such as Process Explorer will show you the worker process now running as a child process to our Container redirection engine, as shown below.
This completes how to run (IIS) in a Cloudhouse Compatibility Container.