在IIS7上运行TRAC
我正在尝试在我的IIS/w2008服务器上运行Trac,参考了这个常见问题解答:TracOnWindowsIisAjp
在“3. 为IIS安装Tomcat AJP连接器”之前的所有步骤都进行得很顺利。接下来,我把我的目录定义为:C:\wwwroot\trac.evju.biz\AJP\,在bin文件夹里放了一个dll文件和三个配置文件,内容如下:
isapi_redirect-1.2.26.properties # ISAPI重定向器的配置文件
# The path to the ISAPI Redirector Extension, relative to the website
# This must be in a virtual directory with execute privileges
extension_uri=/AJP/isapi_redirect-1.2.26.dll
# Full path to the log file for the ISAPI Redirector
log_file=C:\wwwroot\trac.evju.biz\AJP\logs\isapi_redirect.log
# Log level (debug, info, warn, error or trace)
log_level=info
# Full path to the workers.properties file
worker_file=C:\wwwroot\trac.evju.biz\AJP\conf\workers.properties
# Full path to the uriworkermap.properties file
worker_mount_file=C:\wwwroot\trac.evju.biz\AJP\conf\uriworkermap.properties
workers.properties
# Define 1 real worker
worker.list=trac
# Set properties for trac (ajp13)
worker.trac.type=ajp13
worker.trac.host=localhost
worker.trac.port=8009
worker.trac.socket_keepalive=0
uriworkermap.properties
/C:\wwwroot\trac.evju.biz\irm\*=trac
然后我遇到了一些问题:
- 定义一个名为AJP-Connector的虚拟目录,指向你的bin子目录,并且要有执行可执行文件的权限(不仅仅是脚本)。
我定义了一个名为AJP的虚拟目录,指向bin子目录,但我找不到任何方法来给它设置执行权限。
而且后面的指示显然不太适用于IIS7。
- 允许DLL作为Web服务扩展执行。
- 在IIS管理器中,打开Web服务扩展。
- 定义一个新的Web服务扩展,叫做AJP-Connector(或者你想要的名字)。
- 将C:\AJP-Connector\bin\isapi_redirect-1.2.26.dll添加到所需文件中(把"C:\AJP-Connector"替换成你的实际目录)。
- 将扩展状态设置为允许。
我尝试将dll添加为ISAPI扩展,这导致在bin文件夹中生成了一个web.config文件,内容如下:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<handlers accessPolicy="Read, Execute, Script">
<remove name="ISAPI-dll" />
<add name="AJP" path="*.ajp" verb="*" modules="IsapiModule" scriptProcessor="C:\wwwroot\trac.evju.biz\AJP\bin\isapi_redirect-1.2.26.dll" resourceType="Unspecified" requireAccess="Execute" />
</handlers>
</system.webServer>
</configuration>
任何帮助都非常感谢。
2 个回答
0
我在一次无关的谷歌搜索中偶然发现了这个问题。真是奇怪,怎么会这样……
IIS7本身就支持FastCGI,我强烈建议你使用这个,而不是AJP。如果你还在关注这个问题,可以留言,我会跟你分享安装的详细步骤。
0
@Jeff Mc - 我其实是在研究如何在IIS7上设置trac,正好像你一样看到了这个讨论。我很想了解关于使用FastCGI的具体细节,还有在IIS7上使用trac时可能遇到的其他问题。