通过 LAN 访问 IIS 7.5 - SSI(服务器端包含)问题

发布于 2024-12-17 00:40:13 字数 685 浏览 5 评论 0原文

我是一名前端开发人员,在 IIS/.NET 网站上工作。我的本地开发设置是带有 IIS 7.5 的 Windows 7。我目前正在开发一个移动网站,并且希望能够在局域网上的各种移动设备上进行本地检查。

经过大量的试验和错误,我能够弄清楚如何通过 LAN 访问我的开发盒,但我认为我的解决方案有点复杂......部门标准是在新的 IIS“站点”下进行开发我们工作的每个网站(因为我们从事许多不同的项目,并且它们通常有非常不同的要求),位于 \inetpub\wwwroot 目录之外。所以基本上,我不使用“默认网站”,但我注意到这是我可以通过 LAN 访问的唯一“网站”。我最终在默认网站上添加了一个虚拟目录,指向我想要通过 LAN 访问的网站的 Web 根目录(例如“mysite”)。

我添加了“安全万维网服务 (HTTPS)”、“Web 管理服务 (HTTP)”和“万维网服务 (HTTP)”的防火墙例外,瞧,我可以从 LAN 上的任何设备访问该站点,通过 http://xxx.xxx.xxx.xxx/mysite

唯一的问题是站点上的 SSI(服务器端包含)无法正常工作。我刚刚收到一条“处理 SSI 文件时出错”消息,其中应包含每个文件。

我认为这一定是我设置虚拟目录的方式有问题,或者可能是阻止网络上的 SSI 内容的安全设置。

有什么想法吗?

I'm a front end developer, working on IIS/.NET websites. My local development setup is Windows 7 with IIS 7.5. I'm currently working on a mobile site, and want to be able to check it locally on various mobile devices on the LAN.

After a lot of trial and error, I was able to figure out how to access my dev box over the LAN, but I think my solution is a little convoluted... The department standard is to develop under a new IIS "site" for every website we work on (since we work on many different projects and they often have very different requirements), outside of the \inetpub\wwwroot directory. So basically, I don't use the "Default Web Site", but I noticed that that was the only "site" I could access over the LAN. I ended up adding a Virtual Directory on the Default Web Site, pointing to the web root of the site I want to access over the LAN (e.g., "mysite").

I added firewall exceptions for "Secure World Wide Web Services (HTTPS)", "Web Management Service (HTTP)", and "World Wide Web Services (HTTP)", and voila, I can access the site from any device on the LAN, via http://xxx.xxx.xxx.xxx/mysite.

The only problem is that the SSIs (Server Side Includes) on the site aren't working. I just get a "Error processing SSI file" message where each file should be included.

I was thinking that it must be a problem with either the way I set up the Virtual Directories, or maybe a security setting that blocks SSI content across the network.

Any ideas?

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

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

发布评论

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

评论(1

卷耳 2024-12-24 00:40:13

如果您的 html 和文件不在默认的 Inetpub 文件夹中,您是否已将 IUSR_MachineName 本地帐户添加到 NTFS 权限?否则匿名身份验证将无法工作。

{编辑}
抱歉,我错过了您所说的更改防火墙权限并使网站正常运行的行。但是,如果 SSI 所在的文件夹没有正确的 NTFS 权限,则可能意味着工作进程无法访问包含内容。 (现在我猜)

If your html and files aren't in the default Inetpub folder have you added the IUSR_MachineName local account to the NTFS permissions? Otherwise Anonymous authentication won't work.

{Edit}
Sorry I missed the line where you said you changed the firewall permissions and got the sites working. However if the folder the SSI's are in doesn't have the correct NTFS permissions it might mean the Worker Process can't access the includes. (Now I'm guessing)

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