Turn An Old PC Into a Webserver

Have you got an old PC lying around?  Have you ever wondered how easy it would be to turn it into a web server, so you can learn about hosting your own web sites instead of renting space on a commercial server?

Back in 2009 I put together a step-by-step document that explains how to do it, using Ubuntu Server 7.10.  This is now rather out of date, so I've spent the past few days updating it for Ubuntu Server 11.04 (Natty Narwhal), which is available now ahead of its official launch next month.

If you fancy turning that old machine (or even a virtual machine) into a fully functional web server running Ubuntu Server, Apache, MySQL, PHP, ftp, phpMyAdmin, Webmin, and Webalizer, which you can access from anywhere on your home or office LAN, you can get the complete document for free.  Just go to www.the-web-book.com/build-your-own-webserver.html.

 

 

 

 

Share this
4.09524
Average: 4.1 (21 votes)
Your rating: None

Comments

by JackDes (not verified) on 13. April 2011 - 7:51  (70087)

Hey all, great discussion and exactly about a topic that I am *very* curious about and fascinated with.

Can you guys tell me what would be the best solution for streaming video content from either my PC or Mac. They're both pretty powerful, so that part shouldn't be an issue. I've figured out with the help of applications as to how to stream files locally to my iPad and Apple TV, but I really want to know about setting up a server that can be accessed by one or two people from outside my LAN!

I read a lot about XBMC (Xbox Media Center) and Plex, but are these a good idea for what I'm trying to accomplish? I run Windows 7 Ultimate 64-bit as well as Mac OS X 10.6.7. I also run Ubuntu 10.10 in a virtual machine on OS X.

Thanks so much! :)

Jack

by Dr.Bones (not verified) on 28. March 2011 - 19:57  (68709)

You could also look at Amahi.org's project which is based on Fedora. We use it with our home network and it has the capability to do many of the things described in the article.

by Lost_my_username_again (not verified) on 28. March 2011 - 12:48  (68685)

The question asking what you can do with a web server is a good one, since the article says

"The risk of someone hacking the server is high. Running your own web server is a fun, educational project, and very handy for testing new stuff within a closed environment. But hosting externally-available web sites yourself is not a sensible idea."

This would seem to rule out accessing it from outside your own network. E-mail seems interesting, though. Any suggestions as to software to use? (Or a way to make your own server secure from the outside?)

by WHiTe_aSH143 on 30. March 2011 - 13:47  (68828)

I found an old ubuntu archived post explaining how to set up encrypted email server... I deleted the bookmark not even three days ago... lol... but try googling "postfix" or "encrypted email and ubuntu" that's how I stumbled across it.

by GRuiz (not verified) on 27. March 2011 - 4:40  (68630)

My two cents...

I'd recommend installing OpenSSH instead of Telnet, it is an insecure service and all your credentials and data are transmitted unencrypted. To install OpenSSH, just execute apt-get install ssh openssh-server. If you are using M$ Windows, you need to download an SSH client. My fav one is Putty SSH. You can download it at this location:

http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html

Good luck!

by Martijn (not verified) on 26. March 2011 - 13:31  (68599)

IMHO an old PC consumes more power than a newer PC. By turning the old PC into a web server you actually tell the PC to run 24 hours a day, 7 days a week. The PC is just waiting for the moment that someone requests a webpage from the server.

It would be nice when the article also tells something about power consumption. Perhaps the PC can "Wake on LAN" so when a request is coming in it wakes and serves the page: http://ubuntuforums.org/showthread.php?t=234588

I guess that could save quite some power for a system that is supposed to serve stuff 24x7.

by fordman922 (not verified) on 27. March 2011 - 21:02  (68669)

Dude...it doesn't take a whole lot to run a pc...about the same as a night light esp. when the monitor, which is not neded after setup and configuration, is left off. I mean, come on... using a new pc for the task kinda defeats the whole reason for this article. Most folks I know don't want to tie up their new / primary system for this task and have an old system lying around anyway, which is what this whole piece is about...don't be a sheep, be a shepard!

by Frankly Frank (not verified) on 26. March 2011 - 15:56  (68604)

You're probable right about the power issues however, the article has worth for someone who can't afford to upgrade to an actual server platform. It does point out that it "is" possible to use an old platform for this purpose. "If" and the key here is if, the old box is to serve on a home network, do you think it possible to shut it down when you power down the other systems? Maybe set it to sleep or hibernate? Wake up on a special "Magic Packet" or need for some stored information? I mean after all, what is the “Power Options” section of the Control Panel for? Systems on my network power down when not in use. The network adaptor can be set to wake on a signal.

The article points to a "possible" use of an old box. A poor man’s server if you will. I think you adage about, "Perhaps the PC can "Wake on LAN"" doesn't give thought to the operators knowledge of systems. When does one think outside the box? IMHO that is.

by Anonymous_12345 (not verified) on 26. March 2011 - 12:53  (68597)

Is this web-server works only on home network...I mean...Is it possible to access this server over internet, from remote location outside of the home network.

by Paul G (not verified) on 26. March 2011 - 18:17  (68615)

Google "Port Forwarding". Most routers can do this. Just forward port 80 to your web-server (best with a fixed IP address) and off you go.

by Lekann (not verified) on 25. March 2011 - 3:36  (68531)

I like the idea! But can this be used to setup your own cloud server?

by robert.schifreen on 27. March 2011 - 0:04  (68623)

If you fancy setting up your own private cloud, take a look at eyeOS (www.eyeos.org). It's a web-based desktop, with apps, implemented in PHP that you can host on your own web server. Very clever indeed, and free.

by WHiTe_aSH143 on 30. March 2011 - 13:50  (68830)

How does eyeOS compare to say Peppermint (or Ice)? Or is it a separate concept altogether...?

by Anonymous_34565436 (not verified) on 25. March 2011 - 1:35  (68521)

dumb question but what all could i do with a web server? i've heard that you can set up your own VPN for when you're at one of those public wifi spots but wondering what else aside a website....would be great if others had some ideas...thanks...

by WHiTe_aSH143 on 25. March 2011 - 1:55  (68523)

You can also host your own email service complete with encryption and all that...

Gizmo's Freeware is Recruiting!

Gizmos Needs YouShare your knowledge of free software with millions of Gizmo's readers by joining our editing team.  Details here.