2

I've read a few tutorials on setting up a server on HowtoForge etc.. So I'm aware of the installation and software requirement part. However , how do I go about assigning domains to my server. When I set my VPS up , it only asked me for a hostname. How do I point domains to my server ? I use GoDaddy as a registrar. Thanks in advance

3 Answers 3

1

At a very simple level- at your registrar you can amend the DNS records for the domain - you would point the A (and possibly MX for mail) records at the public IP address allocated to your VPS. There's a huge variety of options depending on what exactly you want to do. Provide a little more info for a more detailed answer.

1

With GoDaddy, you go to the DNS management tool and point your DNS records at the IP address of your VPS.

To configure Apache to handle multiple domains, you need to look at the VirtualHosts directive. An except from mine:

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>

Configuring sendmail for multiple domains is a teensy bit harder than apache - a restart of apache (or apachectl graceful) will load any new virtual domains.

1

Check with your VPS provider. Often, they would provide you with configuration entries for the two DNS servers. So, you would then need to sent these entries in the DNS section of your GoDaddy account. This will allow your VPS provided DNS servers to serve as the authoritative servers for your domain.

Alternatively, you could use an alternative DNS service provider (e.g. Zoneedit) and configure the appropriate A-record and CNAME-records to point to your VPS provided IP. Then, configure GoDaddy to use the Zoneedit servers as the authoritative DNS servers.

You must log in to answer this question.