开发者

How to attach domain name to my server? [closed]

开发者 https://www.devze.com 2023-04-13 05:54 出处:网络
Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed. This question is off-topic. It is not currently accepting answers.

Want to improve this question? Update the question so it's on-topic for Stack Overflow.

Closed 11 years ago.

Improve this question

I have a small problem, looked here & other forums, but could not find solution开发者_如何学Python. I have site at my-domain.com, site is on shared host. In my domain register I added DNS servers which hosting provider gave to me when I opened hosting account for my-domain.com and all that works for 1 year. Since traffic to site increased, hosting company told me to move my site to vps or dedicated server on their hosts or some other hosts, so I found good offer on another provider and bught 1 vps with tech specs that I need with ubuntu 10.10.

On the other side, I makde on my computer ubunutu 10.10 installation and rewrited application for better performance (web server/mail server/database etc...) When I make backup on my home machine, and upload and extract on remote VPS everything is as it should be, but I ma testing using VPS IP address, site that users and search engines access is on old shared hosting still.

Now I want to add new remote vps IP to my domain register NAME servers, but I don't know:

-should I add my VPS ip? -in that case what be my secondary name server? -what I need to do on my remote VPS with complete site(app) to edit so it can be accessible to my-domain.com?is that hostname, or what?

I hope that You understand what is problem, and I am sure that this is something simple for people who are doing with those stuffs,so please help me.Thanks


Just to explain, you have multiple things here:

  • Domain name
  • DNS nameservers
  • Web server(s)

All of these can be hosted with separate providers, but depending on your provider you might have different management options.

Domain name

Your domain name has a registrar (who you bought it from). That registrar will keep a list of 1-3 'nameservers' which are the addresses for the provider that hosts your DNS.

DNS nameservers

Your DNS is like your address book. That needs to be hosted somewhere, and if your old host didn't let you edit it, it's probably just part of their shared hosting service, and not something you can manage. You will need to change your domain name to point to another set of nameservers at a provider you can manage. Your VPS provider probably has a DNS service, but possibly not free (although many are). If needed you can use a free DNS host like XName or ClouDNS, but depending on your level of knowledge you might find these difficult to use.

A basic web server record you will want to add is known as an A record, and will point my-domain.com. and/or www.my-domain.com. (using a separate record) to your web server's IP address.

Web server

Your server has an IP address. If you need to load-balance for performance reasons you'll need your hosting company to provide you a 'virtual IP' or a load-balancer service, behind which you can have multiple servers.

Summary

The way the request goes is:

  1. User types my-domain.com into their browser
  2. The user's ISP's DNS server is queried for my-domain.com
  3. The web server IP address for my-domain.com is returned
  4. The user's browser sends a HTTP GET request to your server to get the web page

One part of the process leads onto the next, so you need to make the 3 things work in harmony to get your site to function.

0

精彩评论

暂无评论...
验证码 换一张
取 消