Skip to content

Transform an Outdated PC into a Linux-based Web Hosting Server

Employing outdated hardware for web hosting serves as an economical and educational method for mastering web development and server management skills.

Using outdated computer hardware to host a web server offers a budget-friendly and practical way...
Using outdated computer hardware to host a web server offers a budget-friendly and practical way for mastering web development skills, as well as gaining expertise in server administration.

Transform an Outdated PC into a Linux-based Web Hosting Server

In the early days of the digital world, back in '89, a genius named Tim Berners-Lee breathed life into the World Wide Web (WWW), often known as The Web. He invented it as a "universal linked information system" designed for sharing documents and info. The basic building blocks? Web servers running on Hypertext Markup Language (HTML).

Let's take a stroll down memory lane, shall we? The first web server was none other than a top-notch NeXTcube computer, specifically located at CERN - the European Organization for Nuclear Research based on the France-Switzerland border. For obvious reasons, a surplus of sticky notes adorned the machine, one instructing, "This machine is a server do not power down." Quite the contrary to our modern hibernation settings!

Fast forward to today, and we've got a bloated, tangled mess of a web on our hands. But don't worry, you can still fashion a humble web server with a low-power Intel-based Single-Board Computer (SBC) – in our case, the LattePanda 3 Delta. And guess what? The process ain't restricted to that specific model; get ready to recreate this DIY web server on any ol' computer.

But hey, let's not forget about the big boys. Professional web hosting options exist, offering better performance than our homemade server. However, getting your hands dirty provides the best learning experience – just remember, don't expose the shoddy server to the web at large as we've skipped the security steps. 🕵️‍♂️

So, put on your engineering caps because we're about to dive in! Take note that we're well-aware web hosting is available, but we're here for the learning adventure.

From Enterprise to Personal Storage: The Phison Pascari X200 SSD 💪

Storage? It's a big deal, whether you're working from a desktop PC or a high-capacity data center. Phison's Pascari X200 SSD delivers unparalleled performance, reliability, and efficiency, tailored to meet enterprise workloads. Built on cutting-edge technology, it's all about innovating high-density, high-performance, and energy-efficient storage at scale.

Let's Get Building: A Simplified Web Server Guide 🛠️

  1. Open your terminal and ensure the OS is running the latest software.
  2. Download the Apache web server. There's an array of web server choices (such as nginix or a simple Python server), but let's start with Apache.
  3. Tweak the firewall to give Apache web traffic the green light. Uncomplicated Firewall (ufw) is a user-friendly tool for firewall configuration.
  4. Check whether Apache is up and running.
  5. Install an SSH server. While not mandatory, having a remote and secure connection to the web server means we can swiftly make adjustments and power cycle without being present in person. Skip this step if you don't fancy SSH.
  6. Enable the SSH server.
  7. Start the SSH server.
  8. Adjust the firewall to welcome SSH traffic.
  9. Reboot the system. It's not required, but it takes us back to square one – a fresh start for our server.
  10. Log in and whip up a new terminal, create a test file containing some simple HTML. This will produce a file named "hello.html" in the root web directory (/var/www/).
  11. Add the following HTML to the test file.
  12. Save the file and step away from that terminal, buddy.
  13. Access the server via web browser by pointing it to 127.0.0.1/hello.html. Ta-da! Behold the wondrous creation.
  14. Find the server's IP address, make a mental note, or doodle it somewhere.
  15. Switch to another computer or device, open a browser, and surf to the server's IP address followed by /hello.html. behold your humble web server, teeming with life!

With this foundation laid, use frameworks to make your web content more visually captivating. 🎨

For added flair, we crafted another file called "tom.html" and used Bootstrap, a popular UI system, to create an enticing page. Witness our heroic achievement! 💪🦸‍♂️

Externally Serving the Site: Sharing Your Creation with the World 🌐

Having an internal web server (also known as an Intranet) is cool and all, but what about sharing your brilliant creations with the world? First, open your router to the world via port forwarding. Watch your back, though. Exposing your router means someone could try to wreak havoc on your network. We're in this for sweet, harmless learning, after all. 🤘

  1. Whip out your terminal and find the IP address of your router.
  2. Navigate to the Port Forwarding section within your router settings. Again, where this varies depends on your router.
  3. Direct traffic to your server's IP address, using port 80 for both internal and external communications. Save the changes.
  4. Get the external IP address of your server by visiting https://whatismyipaddress.com/
  5. Surf to your server's external IP address and add /hello.html.

If you see the test page, move on. If not, double-check your router settings.

  1. Create a unique URL for your server using a service like https://www.duckdns.org/ Follow the sign-up and domain name creation steps. This automatically maps your external IP address to the URL.
  2. Access the URL on another device along with the /hello.html suffix.
  3. Revel in your visual masterpiece as your web server wows everyone on your home network. Get creative with frameworks to jazz up your content presentation even more! 🚀

And there you have it! A humble, homemade web server ready to serve up content to users in your home network. 🍰😊

For those lusting for even more DIY craze, check out our Bootstrap-powered file called "tom.html." We whipped up a big, bold page, creating quite the attention-grabber – also known as a "hero" in Bootstrap lingo. 😉

Bonus: External Server Access 🌍

Having an internal web server (or Intranet) is all well and good, but what if you want to spread your wings and share your creations with the globe? For that, you'll need to configure your router for external access.

Take note:

  • Practice safe web browsing. Opening your router to the world means prying eyes may come calling. Secure your setup thoroughly!
  • Skip this section if you're using your server for production purposes.
  • Locate your router's IP address within your terminal.
  • Navigate to your router settings and head to the Port Forwarding section.
  • Route traffic to your server's IP address, with port 80 for both internal and external communications. Execute ports' adjustments accordingly.
  • Get your external IP address at https://whatismyipaddress.com/
  • On another device, surf to the external IP address along with /hello.html.

Confirm that the test page appears.

  1. Snag a funky domain with https://www.duckdns.org/ Follow the sign-up and domain name creation process. This automatically maps your external IP address to the newly created domain.
  2. Navigate to your new domain and add /hello.html.
  3. Share your creation with the world, and bask in the admiration! 🌟💫
  4. In line with the digital evolution, one can enhance a home-and-garden lifestyle by investing in technology, like upgrading to a storage device like the Phison Pascari X200 SSD, a high-performance solution designed for both personal and enterprise needs.
  5. As we explored the DIY web server building process, embracing data-and-cloud-computing includes expanding the reach of our homemade web server by configuring our router for external access, allowing our content to be shared with the world over the World Wide Web (WWW).

Read also:

    Latest