???? ? ??? ? IIS7, ?? ???-?? ??? ???????????? ? ???????? ????? ???????????? ??????? - Windows Vista? ?? ??????, ????? Windows Server 2008! ???? ?? ????? ? ????????? IIS7 ???-????-??, ?? ??? ????????????? ??????? ? ?? ??? ?? ???????????? ;).
??? 1. ????????? FastCGI
???? ?????????? ????? - ? IIS7, ?????? ? Windows Server 2008 ? Windows Vista Service Pack 1 ?????? FastCGI ??? ???????. ??? ?????????? ???? ?????????? ? ??????????. ??? ????? ?? Vista ????? ??????? Control Panel -> Programs ? ??????? "Turn Windows Features On or Off":
????? ????? ?????????? ?????????? ???? ? IIS: Internet Information Services -> World Wide Web Services -> Application Development Features -> CGI. ??? ???? ????? ??????????? ????????? ? CGI ? FastCGI.
?? Windows Server 2008 ??????? ??????????: Server Manager -> Roles -> Add Role Services -> Web Server -> Application Development -> CGI.
?????????? ???, ??? ????????? ??? ????????? ?????? FastCGI. ?????? ?????????? ?????????? ? ???????????? IIS7, ???????, ??? PHP ??? ??????????, ??? ??????? ? ???? ?????????? ?????????.
??? 2. ???????????? IIS7
1. ??????? IIS Manager, ??????? ???? (??????) ??? ???????? ????? ????????? ????????? PHP. ? ????? ??????? Handler Mappings.
2. ???????? ?? ???????? Handler Mappings ?????? Add Module Mapping ? ????????? ???? ?????????? ??????????:
Request path: *.php (????????? ???? ?????? ? ??????????? .php)
Module: FastCgiModule (?????? FastCGI)
Executable: C:\Web\PHP\php-cgi.exe (???? ? PHP)
Name: PHP (??? ??? ????????)
????? ?????????? ???? ????????? ???????? ???? ? ???????? ? ??????????? FastCGI ?????????? ??? ????? ???????????. ????????????.
????????? ???? ???????? ??????? ? ???????? ? ?????????? PhpSites ?????????? web.config ?????:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<handlers>
<add name="PHP" path="*.php" verb="*" modules="FastCgiModule" scriptProcessor="C:\Web\PHP\php-cgi.exe" resourceType="Unspecified" />
</handlers>
</system.webServer>
</configuration>
?????? ????? ?????????? ? ???????? ????????????????? PHP.
??? 3. ????????? ???????????? ?????????
? ?????????? ???? ??? ???????? ?? ???????????????? PHP ??????? ???? index.php:
<?
phpinfo();
?>
? ?????????? ? ????? ????? ????? HTTP ??????. ? ??????????, ???? ??? ?????? ? ???? ????? ?? ?????????, ?????? ????? ????????? ?????????:
