Iis Azure Web App Force Https Alwayson Ping Should Return 200 For Fastcgi Sites
- 28 Apr 2017
PHP, Java and other FastCGI hosted environments should respond to an Always On ping to keep the child process warmed up. Specifically in Azure App Services we send a request to the Root of the site with the header User-Agent: AlwaysOn. If you are forcing HTTPS using a Url Rewrite rule, the Always On ping will get a redirect but will not follow that redirect and therefore the FastCGI module will not be hit and kept warm.
Solution
You can simply add a rule that will look for the ping to the root of your site and the User-Agent: AlwaysOn header and not force HTTPS. The easiest way to do this is to add this Url Rewrite rule before the Force HTTPS rule as follows: