为其他网站使用外部平台进行服务器别名的网站
首先,假设这个问题不是很有描述性——很难总结我在标题中的意思。
让我详细说明一下。在 uservoice.com 上,它们允许用户使用域别名。
例如,这些网站使用域别名:
他们都没有独立托管 uservoice 平台。
所以我的问题是,您认为他们如何使用用户别名?
你认为 uservoice 在 apache 配置中有很多服务器别名吗?
我很好奇。我希望这个问题有意义。
祝你有美好的一天。
First of all, granted the question is not very descriptive - quite hard to summarise what I mean in the title.
Let me elaborate. On uservoice.com they allow users to have domain aliasing.
For example, these sites use domain aliasing:
None of them are hosting the uservoice platform independently.
So my question is, how do you think they're doing the user aliasing?
Do you think uservoice just have a lot of server aliases in the apache config or?
I'm very curious. I hope this question made sense.
Have a good day.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这取决于他们使用的网络服务器。为了进行虚拟主机,您必须使用 HTTP 1.1,它在 Host: 标头中发送浏览器请求的服务器名称。因此,如果用户请求 http://www.foo.com/path/to/something 那么请求看起来像这样:
然后,Web 服务器可以查看“Host”以了解如何处理该请求。
It depends what web server they're using. In order to do virtual hosting, which is what this is, you have to use HTTP 1.1, which sends the name of the server that the browser is requesting in the Host: header. So if the user requests http://www.foo.com/path/to/something then the request looks like:
The web server can then look at "Host" to see how to handle the request.
来自 Apache 文档 基于名称的虚拟主机 :
他们的每个托管站点可能都在其 DNS 配置中设置了一个 cname 以指向用户语音服务器。 Uservoice 可能只是使用默认的虚拟主机来处理所有这些。我怀疑他们每次添加新客户端时都会添加新的虚拟主机条目或服务器别名。这需要重新启动 Apache。
编辑:您列出的网站之一的快速 HTTP HEAD 请求显示他们正在使用 nginx,而不是 Apache。 Nginx 可能具有与 Apache 类似的配置功能。我个人从未使用过它。
From the Apache docs on Name-based Virtual Hosts:
Each of their hosted sites probably has set up a cname in their DNS configuration to point to a uservoice server. Uservoice probably just uses a default virtual host to handle them all. I doubt they add a new virtual host entry or server alias every time they add a new client. That requires an Apache restart.
EDIT: A quick HTTP HEAD request of one of the sites you listed shows me they are using nginx, and not Apache. Nginx probably has similar configuration capabilities as Apache. I've never used it personally.