DOMAIN NAME SERVER (DNS)
Setting up a DNS can be an abstract process. The purpose of DNS is to convert an IP address to a "human friendly" address via the Internet. For example my actual server WAN IP is 67.36.6.214. Most people are not going to remember all of these numbers, so I would rather be able to refer people to my site by way of www.DIYwebserver.com.
In order to do this, we need to have a DNS translate the IP address information to Domain Name information and visa versa. So IP 68.22.34.246 = diywebserver.com & diywebserver.com = 68.22.34.246.
Our goal is to point your Domain Name to your Wan IP.
1) You can pay an ISP or DNS provider like TZO.com to provide this service for you.
2) You can run your own DNS server on the same computer as your web server.
If you are planning to run your own DNS see the section on SimpleDNS
Important, you must already own the Domain Name. See Purchasing a Domain Name for more info.
After completing the DNS setup you will need to change the "Domain Name Server" information with your Domain Registrar. In the case of this tutorial, our Domain Registrar is DirectNIC.
To change Domain Name Server information with DirectNIC, log on to your DirectNIC User account.
Under DirectNIC accounts stats, select the Domain in accounts number. Then select the "Change Name Server" option for the domain name.
Under NameServer 1: enter the "Primary DNS" provider
Under NameServer 2: enter the "Secondary DNS" provider.
Remember that DNS info and Name Server records take about 2-3 days to propagate throughout the Internet. So once You have registered a domain name and submitted your domain to a DNS it could take as long as three days for users on the Internet to access your site using your domain name.
More about DNS>
By changing the "Domain Name Server" information with DirectNIC to point to nsx.diywebserver.com. You are telling our domain name to resolve itself at DIYwebserver.
In short, when someone enters www.your-domain.com into their web browser all DNS servers on the Internet will resolve your domain name at your registered Name Server. The result is the translation of your domain name into an your IP address by the Name Server.
For more info on DNS check out the following links:
REVIEW
At this point you have a computer that has an active DSL connection to the Internet with a static IP address.
Your computer should be connected to a router that has "Port Forwarding" configured to point to LAN IP 192.168.1.3
Your computer should have a static LAN IP 192.168.1.1 address
You have successfully install Apache web server software.
You have successfully accessed you web site (Apache default page) via both your LAN IP and your Wan IP.
You purchased a Domain Name.
You have appointed a DNS service to handle the DNS for your domain name.
You have changed the Name Server information with your registrar, DirectNIC, to point to the Name Servers at which your DNS provider has given you. (Nameserver 1: ns1.example.com, Nameserver 2: ns2.example.com)
If all of the above information has been configured properly, your domain name will be mapped to your web server within 24-72 hours.
You now have a web server running "your-domain.com" on your computer. Remember, if you turn off your computer, people will not be able to access you web site.


