使用 webmatrix 配置 WordPress 站点的主机名

发布于 2025-01-07 18:37:39 字数 413 浏览 4 评论 0原文

如何配置在 Windows 上使用 webmatrix 构建的 WordPress 站点以在特定主机名而不是带有端口号的 localhost 上运行。

例如,我的网站当前正在 http://localhost:64044/ 上运行 我需要能够通过 http://www.mydomain.co.uk 查看它

我知道我可以在 Windows 中编辑我的主机文件,将我的域指向我的本地电脑,如下所示: 127.0.0.1 www.mydomain.co.uk

但我看不到如何或在哪里为 webmatrix 中的 wordpress 站点配置主机名绑定?

How can I configure a wordpress site built using webmatrix on windows to run on a specific hostname instead of localhost with a port number.

For example my site is currently running on http://localhost:64044/
I need to be able to view it via http://www.mydomain.co.uk

I know I can edit my hosts file in windows to point my domain to my local pc like so:
127.0.0.1 www.mydomain.co.uk

but I cant see how or where to configure hostname bindings for the wordpress site in webmatrix?

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

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

发布评论

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

评论(1

邮友 2025-01-14 18:37:39

您可能无法直接从 WebMatrix 执行此操作。但您可以通过编辑 IIS Express 配置文件 %userprofile%\documents\iisexpress\config\applicationhost.config 手动完成此操作(WebMatrix 使用 IIS Express Web 服务器)。查看以下帖子

将 IIS Express 绑定到 IP 地址< /一>

<一href="https://stackoverflow.com/questions/5338184/is-it-possible-to-use-custom-host-headers-bindings-with-iis7-express/5341121#5341121">是否可以使用自定义主机标头/与 IIS7 Express 的绑定?

probably you can't do it directly from WebMatrix. But you can do it manually by editing IIS Express configuration file %userprofile%\documents\iisexpress\config\applicationhost.config (WebMatrix uses IIS Express web server). Take a look at following posts

Binding IIS Express to an IP Address

Is it possible to use custom host headers / bindings with IIS7 Express?

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