Question

Hown Configure a Subdomain to Other Server

Posted March 15, 2014 3k views
i configure a subdomain to point a other server (in zone file). What i want know now is: that config i need to do in this other server subdomain to be accessible? please, be helpful in your explanation. I'm iniciant in linux.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
2 answers
There are two general steps that you need to follow:

1.- Create an A record in your Zone File for the subdomain pointing to the new server. e.g.

subdomain.domain.com. 3600 IN A 0.0.0.0

2.- Configure the webserver in your new server so that it can serve that subdomain. This depends on the webserver running on your other machine (Apache, Nginx, lighthttp, etc)
a zone fila complete?

$TTL 86400
@ IN SOA subdomain.domain.com..com. root.mydomain.com. (
2013042201 ;Serial
3600 ;Refresh
1800 ;Retry
604800 ;Expire
86400 ;Minimum TTL
)
; Specify our two nameservers
IN NS ns1.subdomain.domain.com.
IN NS ns2.subdomain.domain.com.
; Resolve nameserver hostnames to IP, replace with your two droplet IP addresses.
ns1 IN A 1.1.1.1
ns2 IN A 2.2.2.2

; Define hostname -> IP pairs which you wish to resolve
@ IN A 3.3.3.3
www IN A 3.3.3.3
Submit an Answer