加载用户配置文件非常关键,如果不开启则会一直报
HTTP 错误 500.0 - Internal Server Error
C:\php-7.4.30-nts-Win32-vc15-x64\php-cgi.exe - FastCGI 进程意外退出
上面错误有两种解决方案:
第一种配置文件添加:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<defaultDocument>
<files>
<add value="index.php" />
</files>
</defaultDocument>
<handlers>
<remove name="fastcgi" />
<add name="fastcgi" path="*.php" verb="*" modules="FastCgiModule" scriptProcessor="C:\php-7.4.30-nts-Win32-vc15-x64\php-cgi.exe" resourceType="File" requireAccess="Script" />
</handlers>
</system.webServer>
</configuration>
第二种需要添加PHP管理工具
官网地址:https://docs.phpmanager.xyz/
github地址:https://github.com/phpmanager/phpmanager/releases
下载好重启计算机才能出来
其他配置可参照:iis10 php,Windows Server 2019 IIS10.0+PHP(FastCGI)+MySQL环境搭建教程_戴琨的博客-CSDN博客