You might not be able to do it with your particular cable or DSL ISP. Some ISPs forbid this and will shut servers down, or they may simply block port 80... which doesn't prevent web hosting completely, but requires your site to have an unusual-looking URL with a port number.
Cable modem upload speed is usually between 128 and 384kbps, which means that you cannot serve content to others anywhere near as fast as you can download content yourself. DSL providers are more friendly to servers, but they also typically have limited upload speeds, and in many cases will not guarantee high-quality performance for servers run over DSL. The gold-plated option, a "T1" line, costs $600/month from the most affordable providers such as Speakeasy.Net.
Compare the price of any good, reputable hosting company as found on webhostingratings.com. For less than the money you will spend to host it yourself, you can have your own independently rebootable box with full scripting and Unix shell privileges, and multiple redundant Internet connections much faster than a T1 line. And for much less than that -- $10 a month or less -- you can can get more basic hosting packages. For more information, see the "how do I set up a website?" entry.
There are four situations where do-it-yourself hosting sometimes makes sense:
- Hosting companies will not tolerate your content. This is a rare situation. Even adult oriented sites that are not welcomed by some mainstream hosting companies have a choice of hosting providers that will gladly work with them.
- You are willing to pay the price for an extremely fast, professional grade connection at home or in your office, you would like to offset that price by using the connection to host your website, and you don't mind being your own system administrator. This usually turns out not to be worth it. I've been there!
- You just want to learn how it all works. This is a great reason.
- You really, really, really want to. This is also a great reason.
Got a LiveJournal account? Keep up with the latest articles in this FAQ by adding our syndicated feed to your friends list!