@

DIY Webservers  


How great would it be to run your own webserver from home?  Super great.  That's how great.  For one thing your storage cap would only depend on how much free HD space you have.  You could set up an FTP server so that you would never have to carry a floppy or a USB thumb drive again.  Just transfer back and forth from your very own personal FTP server.  If you have a cable or fast DSL connection to the web, it's easy to put together a quick little server.  Don't worry about the speed of your machine however.  The only important thing here is your connection type.

Now this tutorial won't explain every little detail but if you know what you're doing it will be just enough to get you up and running. 

First off, forget Apache and all that nonsense.  You don't need it.  Besides most likely your friendly-neighbourhood cable ISP doesn't want you running a webserver off their connection so they close Port 80.  Guess what Apache wants to use more than anything?   I'm sure you can switch that right up but you can't even get past the installation without it claiming that port.  So if you want to make it easy on yourself, forget Apache.  Then again if you live in some nice country where ISPs love for their customers to run personal webservers then by all means download Apache.   (Disclaimer:  If your ISP's TOS forbids running a webserver then DON'T DO IT!  It's not worth having to go back to dialup.  Because if you get caught that's what is most likely to happen.)

OK.  So there are a couple things you have to keep in mind here.  One, you probably have a static IP address but remember that since you're not paying extra for one the cableco is not obligated to provide you with one.  (The sick thing is they don't even offer people this service.)  As far as I can tell, it must be easier for them to keep your IP static.  Let's call it 'virtually static' which is still better than dynamic.  This may be so they can identify you in the case where you choose to run a webserver.  I don't know.   At any rate if you want to hedge your bets you'd probably best assume that your IP is dynamic and get a Dynamic DNS service.  I hear a ton of good things about DNS2Go.  In the past I've used TZO and found it to be really easy to use.  It's a lot simpler than DNS2Go so I recommend it.  Both of these services simply check your box's IP address and then check it every 10 minutes or so.  If the IP changes then the service updates its DNS records and redirects requests for your URL back to your machine.  It sounds tricky but it's absolutely seamless.   The problem with both of these services is trying to associate your already-registered domain name to your machine's IP.  If you want to use your domain name with one of these services then it'll cost you.  On top of that, you'll have to move your domain name records over to their registries.  If you don't feel like paying $60 a year then you can always use one of their free domains and simply create a subdomain instead.  For example, TZO offers tzo.com, mycablemodem.com and so on.  So your domain might be websitename.tzo.com or websitename.mycablemodem.com.  Now some services will offer all this free and others like TZO will charge you after your trial download expires.  But if you opt for the subdomain instead of your own personal domain name it costs a lot less.  So if you can live with that then go ahead and download TZO's trial.  It's got a pretty nice UI and is easy to get running.

But if you really want to do this on the cheap there's a better way.  Assuming that you have a cable or DSL connection and your ISP is going to assign you a static IP anyway--even though they don't have to contractually--you can set up a simple webserver on your machine with software like TinyWeb.  It's super small and works like a charm.  Oh, and it's free.  I recommend you download its little friend TinyBox which comprises of a GUI for TinyWeb.  I have to say though, read the readme files that come with TinyWeb and TinyBox or you'll never get them running.

Once you've got that running and have a nice directory tree for all your HTML files you're nearly set.  (Now is a good time to throw an index.html file into your root directory.  I suggest <b>Hello World</b>.)  The only problem is that troublesome block on Port 80.  To get around that, tell TinyWeb to serve pages from Port 81 instead.  Save that configuration and you're done.  You could also use a router that supports port redirection instead of using TinyWeb.  Just get into your router's GUI and do what you have to do.  (Now's a good time to mention again that if your TOS forbids running a personal webserver then DON'T!  I can't be responsible for what you do.  This tutorial is for educational purposes only.  I did get this to work but I immediately shut it down again.  Just remember that your ISP knows everything you are doing with your connection!)

Now you can try surfing your page to see if it works.  Find out your IP address.  This might be a little tricky because you're likely to find the IP of the proxy your cableco is putting you through.  When I went to whatismyip.com and then tried to surf to the IP it gave me it didn't work.  So I tried checkip.dyndns.org and used that IP.  That one worked fine.   Type your IP into your address bar like this:  http://12.345.678.9:81.  Don't forget that port 81!  If you've set up an index file in your TinyWeb root directory then it should pop right up.  If your cableco is being extra sneaky they may block Port 81 too.  If this is happening then just set TinyWeb to another port and try that.  If you're still having trouble it's most likely your firewall.  Set it to allow TinyWeb to access the Internet and make sure that it hasn't closed the port you're using.

Great.  So now your server is running and you're all set but that URL has got to go right?  Here's the best part.  Go to a site like DotTK and register a free account.  You get a free .tk domain name too!  Set up that page and then search a site like The Java Script Source for a free timed re-direct script.  Stick that on your .tk page with a little message like "Re-directing to my website..." and you're golden! 

That's all there is to it.  Then you can start adding things like SSL, FTP, CGI, and whatever else you want.  Have fun!


Run a Webserver Part 2