IIS7 - 更改服务器配置中所有站点的物理路径
我快要自杀了,所以请伸出你的耳朵和双手。
我一直在尝试迁移 IIS7 Web 服务器(相当大的服务器),到目前为止,我对 msdeploy 的状态以及使用它来完成我需要做的事情感到震惊。足够了,这是我当前的问题:
我要迁移的服务器的所有站点都位于 D:\ 驱动器上。我们在新环境中不可能有D:\驱动器,所以我需要将所有站点路径更改为C:。 我显然不想为每个站点手动执行此操作,因此我想编辑 applicationHost.config 中的路径。然而,IIS 似乎一点也不关心。所有路径都是 C:\,但 IIS 仍尝试引用 D:。 当我查看站点设置时,它仍然显示 D:。这个价值来自世界哪里?
它位于 64 位服务器上,我检查了 \syswow64\ 中的其他 applicationHost.config,它也神奇地更改为 C:\。
非常感谢任何帮助,或者从 D:\ 迁移到 C:\ 的完全不同的方式。 谢谢。
Very close to killing myself, so please lend your ears and hands.
I've been trying to migrate an IIS7 webserver (rather large one), and so far am appalled by the state of msdeploy and using it for what I need to do. Enough on that, here's my current problem:
The server I'm migrating from has all the sites on a D:\ drive. It isn't possible for us to have a D:\ drive in the new environment, so I need to change all the site paths to C:.
I obviously do not want to do this for each site manually, so I thought to edit the paths in applicationHost.config. However, IIS doesn't seem to care one bit. All the paths are C:\, yet IIS still tries to reference D:.
When I look at site settings, it still says D:. Where in the WORLD is this value coming from?
It's on a 64-bit server, and I checked the OTHER applicationHost.config in \syswow64\, and that has magically changed to C:\ as well.
Any help, or perhaps a completely different way of migrating from D:\ to C:\ is greatly appreciated.
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
通过将 applicationhost.config 复制到 2003 盒子,在那里编辑并复制回来来“修复”它。显然,2008“假装”保存您的文件(即,当我在记事本中打开它时,它显示我的更改),但从某些缓存版本或其他地方的另一个文件中读取它们。
"Fixed" it by copying applicationhost.config to a 2003 box, editing it there and copying back. Apparently 2008 "pretends" to save your file (i.e. it shows my changes when I open it in notepad) but read them from, either some cached version, or from another file elsewhere.