如何像BlogSpot的设置子域 [英] How to setup sub-domains like blogspot

查看:173
本文介绍了如何像BlogSpot的设置子域的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我应该做的设置为用户的子域,当他们登录了到我的网站。

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记录是记录你的
  域名管理设置,可以让
  你控制的子域您
  域。

A CNAME record is a record in your Domain Management Settings that allows you to control a subdomain of your domain.

将其自动化与注册一起,你可以写它为每个用户,当他/她注册。

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的。请注明如果是其他方式)

替代的解决方案

您也可以参考<一个href=\"http://stackoverflow.com/questions/321259/how-to-setup-sub-domains-like-blogspot#321292\">wildcard溶液中,通过参宿一的给予,在相同的线程。我发现他是一个更简单的方法。 :)

You can also refer to the wildcard solution, given by Alnitak, in the same thread. I find his is an easier way. :)

这篇关于如何像BlogSpot的设置子域的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆