我最近使用Wix工具集开发了一个Web应用程序的安装程序(是的,带有安装程序的Web应用程序).
该向导将指导用户获取站点安装所需的所有基本信息,如下所示:
在安装结束时使用自定义操作,我使用文档动态配置IIS处理CGI ,将FastCGI配置为托管PHP,Python,应用程序.有很多步骤和开发来实现这个结果,但问题在于:
我安装了应用程序,一切正常,但是,如果我卸载或安装另一个实例或其他WebApplication,IIS配置的处理程序就像全局一样,并始终指向第一个安装.(卸载应用程序时出现问题)位于C:\ Windows\System32\inetsrv\config中的applicationHost.config是IIS的配置,其"config"类似于global.
<handlers accessPolicy="Read, Script">
<add name="PHP-FastCGI" path="*.php" verb="*" modules="FastCgiModule" scriptProcessor="E:\CIM_dev\bin\php-v5.6\php-cgi.exe" resourceType="Either" />
<add name="CGI-exe_2" path="*.exe" verb="*" modules="CgiModule" resourceType="File" requireAccess="Execute" allowPathInfo="true" />
<add name="TRACEVerbHandler2" path="*" verb="TRACE" modules="ProtocolSupportModule" requireAccess="None" />
<add name="OPTIONSVerbHandler2" path="*" verb="OPTIONS" modules="ProtocolSupportModule" requireAccess="None" />
<add name="StaticFile2" path="*" verb="*" modules="StaticFileModule,DefaultDocumentModule,DirectoryListingModule" resourceType="Either" requireAccess="Read" />
</handlers>
Run Code Online (Sandbox Code Playgroud)
我的问题是,有没有办法为web.config中的每个网站进行此配置?我一直在努力尝试所有的东西而没有成功.