如何使用 IIS7 设置 CF9(多实例,按主机名虚拟托管)
我习惯于使用 Apache 在我的 Windows 计算机上设置 CF9(开发版)。我想尝试使用 IIS7,因为 Win7 Pro 附带了 IIS7。设置它的步骤是什么,以便我可以拥有:
- www.siteA.dev
- www.siteB.dev
这两个都通过 Windows 主机文件指向 127.0.0.1
。我希望 siteA.dev 和 siteB.dev 使用 2 个不同的 CF 实例。我已经使用第二个选项安装了 CF9 开发版。接下来我应该做什么?
- 我需要使用 IIS 管理器,还是只需要 CF 的 Web 服务器配置工具?
- 我在哪里将数据输入 IIS,例如 Apache 中的 vhost?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要安装不同的实例,然后将它们配置为使用您的 IIS 网站。
我解释这里 如何执行此操作(在 Cf8 上,但过程应该完全相同)。
创建实例后,只需转到 c:\jrun4\bin\wsconfig(或 wsconfig 所在的任何位置)并将现有 ColdFusion 实例与 IIS 网站相关联即可。
屏幕如下所示:
(来源:adobe.com)
完成后,您将能够通过主机文件创建的地址访问新实例。
希望这对你有帮助,亨利。
干杯
更新
在这里回答您有关 IIS 的问题。
只需创建 IIS 网站即可。然后转到属性,单击高级,然后添加 nerw 主机标头,如下所示:
alt 文本http://img401.imageshack.us/img401/8720/iis.jpg
在主机标头值上,只需添加您想要的名称,即 mywebsite1.dev。
现在,转到主机文件,并添加一个具有相同值的条目,指向 127.0.0.1
之后,只需按照我上面提到的 WCONFIG 的步骤即可。
You need to install different instances, and then configure them to use your IIS website.
I explain here how to do it (it's on Cf8, but the process should be exactly the same).
After the instances are created, it's as simple as going to c:\jrun4\bin\wsconfig (or wherever you wsconfig is), and relating the existing ColdFusion instance with the IIS website.
The screen looks like this:
(source: adobe.com)
Having it done, you will be able to access your new instances via the addresses created via hosts file.
Hope this helps you Henry.
Cheers
UPDATE
Answering your question about the IIS here.
Simply create the IIS website. Then go to properties, and click advanced, and add a nerw hosts header as below:
alt text http://img401.imageshack.us/img401/8720/iis.jpg
On the host header value, simply add the name you want, i.e. mywebsite1.dev.
Now, go to hosts file, and add an entry with the same value pointing to 127.0.0.1
After that, simply follow the steps I already mentioned above for the WSCONFIG.