Unable to login to PAM on Azure if "Diagnostics settings" is enabled

Document ID : KB000121651
Last Modified Date : 29/11/2018
Show Technical Document Details
After deploying PAM on Azure using .vhd file, PAM becomes inaccessible via the Browser and PAM Client.
This happens "Basic Metrics" is enabled in the Microsoft Azure Portal (portal.azure.com), under Virtual Machines > Diagnostic Settings.

Error message;
"Checking for update failed. Reason: Unexpected end of file from server"
CA Privileged Access Manager 3.x
Root cause is that when the "Basic Metrics" setting is enabled from the Microsoft Azure portal, a Microsoft Azure Extension appends an include directive to the end of the apache2.conf file:
include /etc/opt/microsoft/apache-cimprov/conf/mod_cimprov.conf

Our conf file does not contain a newline at the end. Hence, include directive gets appended onto the last line of the conf file:
Header always set X-Frame-Options SAMEORIGINinclude /etc/opt/microsoft/apache-cimprov/conf/mod_cimprov.conf

"SAMEORIGINinclude" is treated as one token. This causes apache to fail upon restart.
Explanation of the fix:
Solution was to add a new line to end of conf file, in case 3rd parties like Microsoft extension appends a line without putting a newline first.
Additional Information:
This fix will be included in 3.2.4 and 3.3.