1

I want to host an html page on a domain I have purchased. The html page is less than 20 lines of code. On the internet I find recommendations for certain solution stacks, like XAMPP or WAMP or LAMP, or mentions of wordpress. Is all this really necessary? What's the bare bones method that I could have an html page accessible through any browser in the world? I have a secondary laptop I'm willing to dedicate to the task. Searching is difficult as most results are tailored to entrepreneurs or those who need a full stack.

0

3 Answers 3

2

No, all of that is fortunately not necessary. :-)

You just need an HTTP server. Nginx is a good choice if you're hosting yourself. Its default configuration is all you need.

I do recommend though adding LetsEncrypt to get an HTTPS certificate for your server. It's free and automates via CertBot if you've installed Nginx (or other common web server).

1

You would need a static IP address to effectively host a publicly accessible website from your own network. As an alternative you could use a free static hosting solution like Github Pages, Render or Cloudflare Workers.

3
  • 1
    You don't actually need a static IP address. It is common to use a dynamic IP address with Dynamic DNS for hosting. May 29 at 9:51
  • 1
    I actually agree with this answer - I think a free hosting solution may be the easiest way forward, and Besworks did qualify the need for a static as being to effectively host a website.
    – davidgo
    May 30 at 1:32
  • DDNS is certainly an option and I upvoted that comment because it does add value but the OP asked for a "bare minimum" method and mentioned that they have already purchased a domain name. Not all DNS providers offer dynamic configuration and I wouldn't really call the steps required to configure such a service along with the routing and server software setup to be a minimum of effort.
    – Besworks
    May 30 at 14:33
1

There are 3 parts to solving this problem (ie hosting website on your own computer) -

  1. Pointing the domain to the website. I expect you have this under control, and if you don't its usually easy enough to do through your domain registrar.

  2. Allowing requests to get to your web server. If you are hosting this at home you will need to make changes to your router firewall to allow it to push connections to the computer you are using as a web server.

  3. You need to set up a web server. As others have mentioned, you can install Apache or NGINX or any other web server and just make your pages available through that. In practice though, it may actually be easier to get a simple "WAMP" or similar stack which does this for you, along with some other bits you don't need.

From a technical POV, the answer is quite different. You may be able to host the website on your router or even a $5 ESP8266 - although doing this is probably more work then a prepackaged solution.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.