如何使用 IIS7 很好地管理许多本地主机网站 URI

发布于 2024-09-03 19:28:41 字数 435 浏览 1 评论 0原文

我无法为我正在处理的所有网站建立一个干净的开发环境。我正在开发多达 40 个不同的网站,并且其中至少有 5 个是同时进行的。我需要将它们全部放在站点根目录中,以便 URL 管理能够与所有 CMS 配合使用。

我的第一次尝试是为它们使用增加的端口号,从 localhost:1000 开始,然后向上。不幸的是,需要花大量时间查找哪个端口属于哪个网站,这非常令人恼火。

我的第二次尝试是使用主机文件将烦人的端口映射到真实的单词。所以我最终得到了 localhost.tele2、localhost.ikea、localhost.volvo 等。不幸的是,这需要很长时间来设置(清理并添加到主机文件,在 IIS 中设置具有最高端口号的网站等)并且我经常需要刷新 DNS 缓存,以便让我在主机文件中添加/删除的一些站点正常工作。

那么如何在IIS7中很好地组织大量网站呢?也许我错过了您正在使用的一个非常聪明的方法。

I'm having trouble setting up a clean development environment with all the web sites I'm working on. I'm working on up to 40 different web sites, and at least 5 of them simultaneously. I need them all to be in a site root, for URL management to work with all CMSes.

My first attempt was to use increasing port numbers for them, beginning with localhost:1000 and working upwards. Unfortunately, it took a great deal of looking up which port belonged to which web site, and it was very irritating.

My second try was mapping the irritating ports to real words using the hosts file. So I ended up with localhost.tele2, localhost.ikea, localhost.volvo etc. Unfortunately, this takes a long time to set up (cleaning and adding to the hosts file, setting web site with highest port number in IIS etc.) and regularly I have to flush the DNS cache in order to get some sites working that I've added/removed from the hosts file.

So how do I organize a lot of web sites in IIS7 nicely? Perhaps I've missed a very clever method that you're using.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

可遇━不可求 2024-09-10 19:28:41

我创建了一个快速程序,按下一个按钮,在我的主机文件中将域列表设置为 127.0.0.1,然后按下另一个按钮,所有这些条目都将被删除,以便我的计算机恢复正常。

i created a quick program that i press a button and a list of domains is set to 127.0.0.1 in my host file, and press another button and all these entries are removed so my computer goes back to normal.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文