开始使用VPS

我已经阅读了一些在HowtoForge等设置服务器的教程。所以我知道安装和软件需求的一部分。 但是,我如何去分配域到我的服务器。 当我设置我的VPS,它只问我一个主机名。 如何将域指向我的服务器? 我使用GoDaddy作为注册商。 提前致谢

在一个非常简单的层面上 – 在您的注册商,您可以修改域名的DNSlogging – 您可以在分配给您的VPS的公共IP地址处指定A(也可能是MX)logging。 有很多种select取决于你想要做什么。 提供更多信息以获得更详细的答案。

使用GoDaddy,您可以转到DNSpipe理工具,并将您的DNSlogging指向您的VPS的IP地址。

要configurationApache来处理多个域,您需要查看VirtualHosts指令。 除了我的:

NameVirtualHost *:80 # ie - if anything directs here and has no matching domain, presume default domain <VirtualHost *:80> DocumentRoot /var/www/<mainsite> ServerName www.<mainsite>.com ServerAlias <mainsite>.com *.<mainsite>.com ErrorLog logs/<mainsite>-error_log CustomLog logs/<mainsite>-access_log common ServerAdmin [email protected] </VirtualHost> <VirtualHost *:80> DocumentRoot /var/www/othersite ServerName www.<othersite>.com ServerAlias <othersite>.com *.<othersite>.com ErrorLog logs/<othersite>-error_log CustomLog logs/<othersite>-access_log common ServerAdmin <admin>@othersite.com </VirtualHost> 

为多个域configurationsendmail比apache困难得多 – 重新启动apache(或apachectl graceful )将加载任何新的虚拟域。

请咨询您的VPS提供商。 通常,他们会为您提供两台DNS服务器的configuration条目。 因此,您需要在GoDaddy帐户的DNS部分发送这些条目。 这将允许您的VPS提供的DNS服务器充当您的域的授权服务器。

或者,您可以使用其他DNS服务提供商(例如Zoneedit),并configuration相应的Alogging和CNAMElogging以指向您的VPS提供的IP。 然后,configurationGoDaddy将Zoneedit服务器用作授权DNS服务器。