I have a cloud server running Windows Server 2016 with IIS 10.0 web server on which I want to install a contact form to email details. I have found a template using PHP and installed PHP 7.1.24 so that the contact form works when I access the form on the cloud server using http://localhost/phpmailer/examples/contactform.php. I can also access PHP info using http://localhost/phpinfo.php. This file is installed at C:\inetpub\wwwroot\phpinfo.php.
However, if I try to access either PHP file externally using http://websitename/phpinfo.php or http://websitename/phpmailer/examples/contactform.php I get a 404 error. I can externally access an HTML file in C:\inetpub\wwwroot OK.
What do I need to do in order to be able to access the PHP file externally?