HTTP Error 500 (or 500.21) is a common issue in IIS when a server is unable to process requests for certain file types, such as .shtm or .shtml, due to missing or misconfigured server-side handlers. This error often occurs when the required IIS features for Server Side Includes (SSI) are not installed or enabled. In this guide, we will show you how to fix this error on Windows Server 2019.
To fix this, we need to install the required IIS features to execute the SSINC-shtm handler. Please follow the steps below to install the required IIS features.
Step 1: Log in to the server (VPS) and go to Control Panel → Programs → Programs and Features → Turn Windows features on or off.

Step 2: On the Server Manager window, click on Add Roles and Features.

Step 3: Click Next on the Before You Begin screen, Installation Type screen & Server Selection screen. On the next screen, Server Roles, you will see the list of roles, select Web Server (IIS).

Select Web Server (IIS) → Web Server → Application Development Features. Make sure you have checked the check boxes of features: .NET Extensibility, ASP, ASP.NET, ISAPI Extensions, ISAPI Filters, Server-Side Includes, and click on next.

Step 4: On the next screen, IIS Role Services Features, click on the Next button.

Step 5: On the next page, you will get a list of Roles, Roles Service, or Features. Based on the Services you have selected, confirm the list and click on Install. Based on the services selected, the setup will take a few minutes to finish the installation process.
Step 6: Then open IIS Manager, select the server hostname under IIS, and select Handler Mappings.

Step 7: On the next screen, make sure you have SSINC-shtm for path *.shtm, and SSINC-shtml for path *.shtml enabled for the ServerSideIncludeModule Handler, path type File.

By installing the required IIS features and verifying the SSINC-shtml/SSINC-shtm handler mappings, your Windows Server 2019 instance will be able to process Server Side Include files correctly. This resolves the HTTP 500 (or 500.21) errors and ensures your .shtm and .shtml pages are served properly.