问题描述
我应该做的设置为用户的子域,当他们登录了到我的网站。
What should do to setup a sub-domain for the users when they sign-up into my site.
需要什么样的基础设施?我使用的Linux服务器。
What are the infrastructure required? I am using Linux servers.
推荐答案
您可以做一个CNAME条目/ A记录在您的DNS设置,为每个子域
You can make a CNAME entry/ A Record in your DNS settings, for each subdomain
一个CNAME记录是记录你的
域名管理设置,可以让
你控制的子域您
域。
将其自动化与注册一起,你可以写它为每个用户,当他/她注册。
To automate it along with registration, you can write a script which is executed for each user, when s/he registers.
您可以参考这个环节,同样,也一步一步的过程为Apache:
You can refer to this link, as well, for a step-by-step process for Apache:
How to setup subdomains in apache
的(既然你提到的Linux,我想那一定是Apache的。请注明如果是其他方式)的
替代的解决方案
您也可以参考wildcard溶液中,通过参宿一的给予,在相同的线程。我发现他是一个更简单的方法。 :)
You can also refer to the wildcard solution, given by Alnitak, in the same thread. I find his is an easier way. :)
这篇关于如何像BlogSpot的设置子域的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!