如何让客户在服务网站上为自己的页面设置自定义域?

How to allow clients to set up custom domains for their own pages on a service website?

我想实现相同的功能Intercom provides to their clients; they allow the implementation of Custom Domains for Articles。我不太确定他们如何实施他们的实施方法,或者他们在幕后做了什么。

采用以下场景;客户(NorthWind 公司)在我公司的网站上有一个子域 (northwind.example.com)。

将发生以下情况:

Intercom 实现它的方式与我希望实现它的方式之间的区别在于我使用的是 子域,而不是目录,如 Intercom 的帮助文章中所示上面有链接。


考虑到我的网站在 Nginx、NodeJS 和 MongoDB 上运行,这是我到目前为止的想法:

我已经调查过 Redirect Web Page to Another Site Without Changing URL and Does a Cname Change the URL that the Browser Displays

我走的路对吗,还是有更好的方法?

我决定通过他们的支持渠道向 Intercom 本身寻求答案,我得到了以下答复:

This isn't actually something we do anything too special with, it is all to do with the configuration of the web server, both on our side and the side of the client.

This Whosebug goes into more details on this, but keep in mind that whilst it is a ruby Whosebug - it focuses on the web server set up, in this case nginx - but it could be any web server software.

How to preserve request url with nginx proxy_pass

This then allows your service to receive the requests, but also have access to the original server address - we then ask our customers to provide the custom domain they are using within their Article Setting to help us translate the server address to the correct help center.

I do hope this helps, if you do have any follow up questions I'm happy to try and help, but as you mentioned this does fall out of the scope of our team so the help I can provide may be limited.

对回复非常满意,因为他们超越了我。基本上,我走的路是正确的。我决定留下这个问题来帮助别人。我还发现了以下相关问题:

  • How to give cname forward support to saas software

祝找到这个的人好运。