AEM Setup 5: Install AEM Dispatcher on IIS
To do the setup I am following the instructions provided by Adobe.
However not all steps where required and there was a few additional steps needed. For this install I am using Windows 10 and IIS 10.
The first thing I am going to do is install IIS. From the start menu type 'windows features' and open 'Turn Windows features on or off'. Select 'Internet Information Services'.
It is required to install ISAPI Extensions so I will select that also.
Although IIS would open I had issues starting websites and had to restart my computer, so now is a good time to restart.
The next step is to download the dispatcher - navigate to https://experienceleague.adobe.com/docs/experience-manager-dispatcher/using/getting-started/release-notes.html
AEM 6.5 requires version 4.3.2 or higher, as I am using 6.5 im going to take the latest vesion 4.3.5 and I am also using IIS so will choose the version for IIS rather than Apache. I dont want OpenSSL support so will choose the 64 bit version with no OpenSSL support. After downloading and unziping I have the following files.
disp_iis.dll - This is the code library file (Dynamic Link Library)
disp_iis.ini - This is the dispatcher config file for IIS.
dispatcher.any - This is the dispatcher config file for the publish instance author_dispatcher.any - This is the dispatcher config file for the author instance.
I am setting this up for my publish instance so will take the following files and add them to my dispatcher folder.
Next I am going to configure disp_iis.ini.
I set the location of the dispatcher.any file under the configpath propery.
I have also set the log file location to be in the same folder.
Set the doc root in the disaptcher.any file - this will set the root folder for the disapatcher cache, this must be the same as the website root. Restart the dispatcher application pool.
Install Dispatcher In IIS
In the left hand panel, right click sites and select 'Add website'. Complete the dialog as show below, ensuring the physical path is the same as the folder you added the dispatcher files.
Set Hosts File
Now edit your hosts file found at "C:\Windows\System32\drivers\etc". Add the line "127.0.0.1 aem-dispatcher".
Set Folder Permissions
Next we need to give the application pool permissions to modify the dispatcher folder. Right click your website and select 'edit permissions',
Click Add, search for IIS AppPool\aem-dispatcher (this is the name of the application pool). Click 'Check Names' the name should be found. Click okay and delegate the account modify permissions.
Integrate the dispatcher ISAPI Module
First select the dispatcher website in the connections menu, select 'Handler Mappings' from the context menu. Then click add Script Map.
In the dialog add the following property values, note that the executable path is the path to the disp_iis.dll in our dispatcher folder.
Open 'Request Restrictions', to ensure that the handler is used for files and folders that are not yet cached, deselect 'Invoke Handler Only If Request Is Mapped To', and then click OK.
Click OK again to create the mapping then click 'edit feature Permissions' in the actions panel, make sure everything is selected.
To fix some errors in the log I had to add some more configurations.
Select the dispatcher website and open Coniguration Editor (under management).
In the 'section' dropdown select system.webServer/handlers and in the 'from' dropdown choose the dispatcher config, select count and open the dialog.
Select 'Dispatcher', set requireAccess property to be none.
If you don't have permission to set properties, select the root from the connections panel, choose Feature Delegation (under management), set Anonymous Authentication to read/write.
Test Dispatcher Is Working
Ensure the publish instance is running and navigate to a page via the dispatcher e.g http://aem-dispatcher:8080/content/we-retail/us/en.html
If successful the page should show and you will see the page cache (content folder) created in the dispatcher folder.
Several times during the install I was able to debug issues by checking the dispatcher log. I hope this helps you.