iTop和IIS

目录访问保护

iTop软件包与web.config文件捆绑在一起,以保护关键目录和文件访问。

尽管提供了web.config文件,但是对于IIS配置而言,该保护可能无效。因此,您必须检查保护措施是否有效:请参阅目录列表进行检查。

还要检查通用的安全配置页面!

最长执行时间

如果您在IIS上运行iTop且PHP以FastCGI模式运行,请注意IIS对CGI流程的最大执行时间施加了自己的限制。默认情况下,此限制配置为300秒。这意味着,即使您在PHP.ini中进行配置最大执行时间如果大于300秒的价值,IIS将在300秒后停止CGI流程。

当交互执行批量和冗长的操作(例如,批量修改,批量删除或CSV导入)时,iTop会自动延长PHP的最大执行时间,以防止运维在其完成之前被中断。这对IIS施加的限制没有影响,尽管5分钟后任务仍可能被终止。

有关如何修改此超时限制,请参考IIS文档: 配置CGI超时设置(IIS 7)

为PHP配置IIS

为IIS 6安装Fast-GCI

IIS 6是Windows XP和Windows服务器2003附带的IIS的版本。流程与IIS7非常相似(请参见有用的链接和参考下面)

1、从以下位置下载IIS的Fast-CGI安装程序:http://www.iis.net/download/FastCGI. 选择适合您的系统的版本(32或64位)。

2、通过启动.msi安装程序来开始安装

https://www.itophub.io/wiki/media?w=250&tok=c042ad&media=mediawiki%3Ainstallfastcgi-1.png

https://www.itophub.io/wiki/media?w=250&tok=80e782&media=mediawiki%3Ainstallfastcgi-2.png

https://www.itophub.io/wiki/media?w=250&tok=89d12f&media=mediawiki%3Ainstallfastcgi-3.png

https://www.itophub.io/wiki/media?w=250&tok=914f9d&media=mediawiki%3Ainstallfastcgi-4.png

安装和配置PHP

1、从下载PHPhttp地址:http://windows.php.net/download/. 为您的系统(32或64位)选择适当的版本,然后选择Non-Thread Safe版本。如果您不了解VC6和VC9,请选择VC6版本。

https://www.itophub.io/wiki/media?w=250&tok=934fca&media=mediawiki%3Ainstallphpwin-1.png

https://www.itophub.io/wiki/media?w=250&tok=798599&media=mediawiki%3Ainstallphpwin-2.png

https://www.itophub.io/wiki/media?w=250&tok=6e7a43&media=mediawiki%3Ainstallphpwin-3.png

选择IIS Fast-CGI接口:

https://www.itophub.io/wiki/media?w=250&tok=287395&media=mediawiki%3Ainstallphpwin-4.png

确保选择默认情况下未启用的“ SOAP”扩展名。另外,在“其他”部分中,检查“ PEAR安装”。

https://www.itophub.io/wiki/media?w=250&tok=d08fe1&media=mediawiki%3Ainstallphpwin-5.png

https://www.itophub.io/wiki/media?w=250&tok=998f24&media=mediawiki%3Ainstallphpwin-6.png

https://www.itophub.io/wiki/media?w=250&tok=66baf2&media=mediawiki%3Ainstallphpwin-7.png

然后为整个网站注册FastCGI扩展:

cd %windir%\system32\inetsrv
cscript fcgiconfig.js -add -section:\"PHP\" -extension:php -path:\"C:\Program Files\PHP\php-cgi.exe\"

打开Internet信息服务(IIS)经理(从开始菜单“管理工具Internet信息服务(IIS)经理”或右键单击“我的电脑”,然后单击“管理”和“服务和应用程序Internet信息服务(IIS)经理” ),然后右键单击“默认网站”。然后选择“属性”。

https://www.itophub.io/wiki/media?w=144&tok=6d1ea1&media=mediawiki%3Aiis6-properties-1.png

然后单击选项卡“主目录”,然后单击“配置…”按钮:

https://www.itophub.io/wiki/media?w=230&tok=3b873e&media=mediawiki%3Aiis6-properties-2.png

在“映射”选项卡中检查是否存在“ .php”扩展名的条目。

https://www.itophub.io/wiki/media?w=203&tok=2203f7&media=mediawiki%3Aiis6-properties-3.png

如果没有,请按“添加…”按钮,并如下所示填充表单(将路径调整为fcgiext.dll的正确位置)

https://www.itophub.io/wiki/media?w=215&tok=709ddb&media=mediawiki%3Aiis6-properties-4.png

返回“文档”选项卡,并检查列表顶部是否存在“index.php”。如果不存在,请使用“添加...”按钮为其添加一个条目。

https://www.itophub.io/wiki/media?w=230&tok=6c2d4e&media=mediawiki%3Aiis6-properties-5.png

有用的链接和参考

  • php.iis.net有关如何使用IIS在Windows上运行PHP应用程序的说明
  • ·使用FastCGI在IIS 6.0上托管PHP应用程序,作者Ruslan Yakushev
  • 在服务器Core上安装PHP和FastCGI支持
  • ·在Windows服务器2008,Windows服务器2008 R2,Windows Vista或Windows 7的IIS 7中启用FastCGI支持

原贴链接:https://www.itophub.io/wiki/page?id=2_7_0%3Ainstall%3Aiis


iTop and IIS

Directories access protection

iTop packages are bundled with web.config files to protect critical directories and files access.

Though web.config files are provided, the protection might be ineffective with regards to your IIS configuration. Therefore, you will have to check that the protection is effective: See the list of directories to check.

Also check the generic security configuration page !

Max execution time

If you are running iTop on IIS with PHP running in FastCGI mode, be aware that IIS imposes its own limit to the maximum execution time of a CGI process. By default this limit is configured to 300 seconds. This means that, even if you configure in PHP.ini maximum_execution_time to a value greater than 300 seconds, the CGI process will be stopped by IIS after 300 seconds.

When performing bulk and lengthy operations interactively (such as mass modifications, mass deletions or CSV import), iTop extends the PHP maximum execution time automatically, in order to prevent the operation from being interrupted before its completion. This has no effect on the limit imposed by IIS, and though the task may still be killed after 5 minutes.

Refer to the IIS documentation for how to modify this timeout limit: Configure CGI Time-out Settings (IIS 7)

Configure IIS for PHP

Installing Fast-GCI for IIS 6

IIS 6 is the version of IIS that comes with Windows XP and Windows Server 2003. The process is quite similar for IIS7 (see the Useful Links & References below)

  1. Download IIS's Fast-CGI installer from: http://www.iis.net/download/FastCGI. Pick the version (32 or 64-bit) suitable for your system.

  2. Start the installation by launching the .msi installer

https://www.itophub.io/wiki/media?w=250&tok=c042ad&media=mediawiki%3Ainstallfastcgi-1.png

https://www.itophub.io/wiki/media?w=250&tok=80e782&media=mediawiki%3Ainstallfastcgi-2.png

https://www.itophub.io/wiki/media?w=250&tok=89d12f&media=mediawiki%3Ainstallfastcgi-3.png

https://www.itophub.io/wiki/media?w=250&tok=914f9d&media=mediawiki%3Ainstallfastcgi-4.png

Installing and configuring PHP

  1. Download PHP from http://windows.php.net/download/. Select the appropriate version for your system (32 or 64-bit), and pick the Non Thread Safe version. If you don't know between VC6 and VC9, pick the VC6 version.

https://www.itophub.io/wiki/media?w=250&tok=934fca&media=mediawiki%3Ainstallphpwin-1.png

https://www.itophub.io/wiki/media?w=250&tok=798599&media=mediawiki%3Ainstallphpwin-2.png

https://www.itophub.io/wiki/media?w=250&tok=6e7a43&media=mediawiki%3Ainstallphpwin-3.png

Select the IIS Fast-CGI interface:

https://www.itophub.io/wiki/media?w=250&tok=287395&media=mediawiki%3Ainstallphpwin-4.png

Make sure that you select the “SOAP” extension which is not enabled by default. Also In the “Extras” section, check the “PEAR Install”.

https://www.itophub.io/wiki/media?w=250&tok=d08fe1&media=mediawiki%3Ainstallphpwin-5.png

https://www.itophub.io/wiki/media?w=250&tok=998f24&media=mediawiki%3Ainstallphpwin-6.png

https://www.itophub.io/wiki/media?w=250&tok=66baf2&media=mediawiki%3Ainstallphpwin-7.png

Then register the FastCGI extension for the whole web site:

cd %windir%\system32\inetsrv
cscript fcgiconfig.js -add -section:\"PHP\" -extension:php -path:\"C:\Program Files\PHP\php-cgi.exe\"

Open the Internet Information Service (IIS) Manager (either from the start menu “Administrative Tools/Internet Information Services (IIS) Manager” or right-click on “My Computer” then “Manage” and “Services And Applications/Internet Information Services (IIS) Manager”) and right-click on the “Default Web Site”. Then choose “Properties”.

https://www.itophub.io/wiki/media?w=144&tok=6d1ea1&media=mediawiki%3Aiis6-properties-1.png

Then click on the tab “Home directory” and click on the “Configuration…” button:

https://www.itophub.io/wiki/media?w=230&tok=3b873e&media=mediawiki%3Aiis6-properties-2.png

Check in the “Mappings” tab that there is an entry for the “.php” extension.

https://www.itophub.io/wiki/media?w=203&tok=2203f7&media=mediawiki%3Aiis6-properties-3.png

If not, press the “Add…” button and fill the form as below (adjust the path to the correct location of fcgiext.dll)

https://www.itophub.io/wiki/media?w=215&tok=709ddb&media=mediawiki%3Aiis6-properties-4.png

Go back to the “Documents” tab and check that “index.php” is present, at the top of the list. if it's not there, add an entry for it using the “Add…” button.

https://www.itophub.io/wiki/media?w=230&tok=6c2d4e&media=mediawiki%3Aiis6-properties-5.png

Useful Links & References

标签:
由 superadmin 在 2020/08/27, 15:53 创建
    

需要帮助?

如果您需要有关XWiki的帮助,可以联系:

深圳市艾拓先锋企业管理咨询有限公司