简体   繁体   中英

Hosting Website LIVE on the domain I've bought

I'll get straight to the point. I have bought a domain. I want to host it on my computer, maybe on a raspberry pi since only 50 persons/month will visit it.

Anywhere I've looked I see two hosting methods, using IIS/WAMP/XAMPP to only create a localhost website or adding the domain to C:\\Windows\\System32\\drivers\\etc\\hosts.txt that is also... localhost.

What is the magic answer here? How can I host LIVE a website with the domain that I have bought? Am I stuck to using a hosting service? Am I missing something really important?

using IIS/WAMP/XAMPP to only create a localhost website

You need an HTTP server if you want to host a website. It needs to run on the computer you want to host the website from.

adding the domain to C:\\Windows\\System32\\drivers\\etc\\hosts.txt

That's what you do as a poor man's solution instead of buying a domain name.


The Domain Name needs to be associated with a DNS server (and secondary DNS server) by your registrar.

Usually, a registrar will provide DNS hosting services as part of the deal.

The DNS server needs an A record pointing at the IP address of the computer running the web server. This IP address needs to be available to whomever is going to visit it (which almost certainly needs to be public facing) and should be static (unless you want to play games with very short TTL values and frequent reconfiguration of the DNS servers).

If you plan to host multiple different websites on the same server, you'll probably want to configure the HTTP server software to handle Virtual Name Hosting (whereby it pays attention to the Host header in the request and dynamically serves different content based on it)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM