In this post, I will explain how to enable IIS for hosting PHP websites by Add Module Mapping for PHP files.
Following are the steps required to add module mapping.
-
Open the IIS Manager, from the
Connectionspanel on the left, click on the hostname of your server. -
Double-click on the
Handler Mappingsoption. -
On right side of the
Handler Mappingsscreen, fromActionspanel, click onAdd Module Mapping. -
Type the following information into the appropriate text boxes, and then click OK.
- Request path: *.php
- Module: FastCGImodule
- Executable: C:\php\php-cgi.exe
- Name: PHP_via_FastCGI
-
On the confirmation dialog for creating FastCGI Application, Click Yes.
Now, your IIS should enable to host PHP files. IIS has to be restarted to make new changes in effect.