Sunteți pe pagina 1din 10

Host Your Own Domain, Website and Webserver | Yet Another Linux Blog

Yet Another Linux Blog


Open Source, Open Blog

Home

About

Advertise

Archives

Contact

Donate

Subscribe

Posted on February 13, 2010 by devnet

Previous Next

Host Your Own Domain, Website and Webserver


Hello there! If you are new here, you might want to X subscribe to the RSS feed for updates on this topic.
Powered by WP Greet Box WordPress Plugin

[Translate]

This post was originally published on 13 July, 2006. This version has been updated.

I have a problem with facebook, myspace, and other social networking websites out there. The problem is when I upload my data to their webservers.I dont own it anymore. They do. And they can do whatever they want with it once it is there.

http://linux-blog.org/host-your-own-domain-website-and-webserver/[9/20/2011 7:23:18 PM]

Host Your Own Domain, Website and Webserver | Yet Another Linux Blog

With this in mind, Id rather setup my own twitter using Status.net or my own digg using Pligg. But Id do it on MY OWN SERVER. That way, any content I upload is MINE. It doesnt reside on some server in California or DC and get recycled to advertisements. I like to control my own stuff. I dont like to be cut out of the loop. If youre like me, then youll want to host your own domain, website and webserver so that your friends/family/shrink can quickly and easily connect up to see new photos, find out the latest family developments, and understand why you wear tinfoil hats every Thursday after 4pm. Normally, to host your own webpage you would need to spend around 7 bucks to purchase a domain. Next you would need a hosting plan that usually runs around 3-15 dollars per month to serve up your web pages. What most dont realize is that you can skip these steps all togetheryou dont need to get dedicated hosting (this blog is hosted on dedicated hostingbut started out in my apartment!) to serve pages up to your friends and family. You absolutely do not need to get domain name services through a provider. You can even host your own webserver using a dialup connection (thats rightI said dialup) although. I dont recommend it (but Ive done it using 56.6kbps). Why would you want to do this? The answer might be to stay connected to friends and familyperhaps install a gallery so that your grandparents can see pics of your new dog/car/tinfoil hat. Sure, you could waste my time with MyWaste..er..space and facebook and be barraged daily by advertisers and solicitors and be inundated with the minutiae of what all your friends had to eat for the day or you could roll your own web host, install a gallery or website, and provide media to your friends and family without costing yourself a dime. Thats right, NO COST (except time spent getting it running). Just remember, your website might not survive a digging or slashdotting if you run it yourself. Keep that in mind So

http://linux-blog.org/host-your-own-domain-website-and-webserver/[9/20/2011 7:23:18 PM]

Host Your Own Domain, Website and Webserver | Yet Another Linux Blog

without more chatter, lets get to the meat and potatoes of things: Meat and Potatoes If you have Cable or DSL at home (not a business account) you have something called a dynamic connection. Dynamic connection means that it can change every once in a while. DSL and cable ISPs purchase blocks of IP Addresses in the dynamic range so that they can keep consumers separate from businesses. Its also easier for them to manage dynamic pools of people than to have to remember static connections that dont change for everyone. Because of this probleman ever changing connection for you at homeweb servers and websites do not do very well. The reason for this is because when you visit a website on a dynamic connection one day, it might be different the next day. In order for visitors of a website to find you each and every single time, you need a domain or web name that points back to the address (IP Address) your internet service provider changes on a whim. Youll also need an update service to update your website each time your ISP decides to change things on you. Believe it or not, there are free services out there to do that for you. You just have to be willing to do a little extra work in the beginning to set things up. You can also do this without spending 20-40 bucks a month on DNS service. Ill divide this up into 2 sections. The first will deal with Linux hosting. The second, Windows hosting. This is only something that Ive found easy to do and the price is just right (its free). The only thing that I recommend is a dedicated internet connection (cable, DSL) but even this is not necessary as dialup can be used. I recommend that you use the Linux way of doing things since it is more secure and doesnt require a restart every time you patch it. *note: Im assuming that you arent behind a firewall/proxy of

http://linux-blog.org/host-your-own-domain-website-and-webserver/[9/20/2011 7:23:18 PM]

Host Your Own Domain, Website and Webserver | Yet Another Linux Blog

any kind and that your ISP doesnt block port 80 traffic. If your ISP blocks port 80, see the appendix at the end of this article. LINUX No matter what version of Linux you run, chances are that youll be able to install the apache webserver. This is good news as over half the websites of the world are run by apache. Im not going to address the specifics of how to set up your apacheonly how to get it a fixed address without buying a domain. So, you have your html or php pages located into your webservers public directorygoodwhatever application you have is installed on your server. Now, how to resolve your IPlets say it is25.24.4.166 (for our example) and you want it to have a host.name.com to bind to. Easy to resolve. Go to http://www.no-ip.com/index.php and sign up. You can get a site from noip that is like yourname.theirdomain.com/.net/.info. They have cool names like sytes.net and servebeer.orgeven workisboring.com. Other services like dyndns.org also exist and provide the free service as well. Youll be able to choose your own top level namefor instance, Ithink.dnsiskinky.com could be your new domain name. Next download a client from the download tab: https://www.no-ip.com/downloads.php The linux client is a tar.gz source and is simple to install. Follow the instructions when installing. You may have to install compilation tools (devel packages like GCC) to install the client. You now are the proud owner of yoursite.theirsite.com and your IP will ALWAYS update (as long as noip.com is up) each time you log on/sign on/beam up or whatever it is you do. How does this help you? Well, if youre like me, you have a dynamic IP address. If you connect to the internet via cable, dialup, or dslyou also have a dynamic IP address. Dynamic means that it will change from time to time without warning. So by binding yoursite.theirsite.com to your IP addressyou dont ever have to worry about what IP address you have anymore. Instead, youll always be able to connect using

http://linux-blog.org/host-your-own-domain-website-and-webserver/[9/20/2011 7:23:18 PM]

Host Your Own Domain, Website and Webserver | Yet Another Linux Blog

yoursite.theirsite.com. You can host a webserver using Apache and a virtual host in this style as well (look for another how-to on this subject later) so that everyone can visit a shiny website at yoursite.theirsite.com. Now you can give your friends/family/dog walker/mailman the address to your new webservermaybe its Ithink.dnsiskinky.com like we used in the example above. Now when they visit that address in their web browser, your application or web page displays for them. You also get bragging rights at being the most technical friend/relative/dog walker client/household that everyone knows. Now lets cover Windows.

WINDOWS First you need a free and clear webserver since one is not included by default with windows. You can download Apache for this as well OR try the Abyss Webserver. Interestingly enough, Abyss is also free! I ran it while my linux machine was being worked on (bad hard diskit was a Quantum 200MB drive from 1913had to upgrade) and it worked just great off of Windows XP. Download that puppy and install it. Make sure you read all of the documentation and familiarize yourself with how Abyss does business. The next stepgetting a hostname is even easier than the linux method because you dont have to manually install the noip clientthey have a windows installer. Go to http://www.no-ip.com/index.php and sign up. Choose the domain name you would like (see above examples in Linux section). Next, download the noip client from the download tab: https://www.no-ip.com/downloads.php but this time choose the windows client. From there, youll be able to install this with a simple double click. Fill in all of your information (pretty self explanatory) and make sure that it will run with each time you sign on. Youre set! Your IP will now resolve to the

http://linux-blog.org/host-your-own-domain-website-and-webserver/[9/20/2011 7:23:18 PM]

Host Your Own Domain, Website and Webserver | Yet Another Linux Blog

yourchoice.theirhostname.com CONCLUSION You dont have to spend a dime to keep a domain bound to your IP. This is perfect for the home user who just wants a gallery or homepage. Its even good for someone who has a weblog or enthusiast site. Its good for someone who wants to be able to find their files and musicsetup Jinzora and stream all your music library to yourself anywhere you are! Setup Amahi and have access to all the goodness it brings. Please remember, this wouldnt be good for a business to have. You will probably violate your ISPs terms and conditions for using their connection if you tried to run a business this way. Its always good form to put a link of the stuff you are using on your website to direct traffic back to your software provider. When I used noip, I included a noip link on my main page and also an abyss webserver icon as well. Its just good form and some companies/software providers necessitate the use of their logo or a link on sites that use their software/code. Just be a nice person and give a link back to them. Good luck! Have fun! Also, please note that having hosted my own webserver for quite some time (circa 2001) Ive found Linux and Apache as a combination to be more secure, faster, and more stable than any webserver Ive hosted on the Windows Platform. I included information on Windows mainly to introduce you to the concept of free and open source software. If you thought getting a webserver for free was great, think about getting a whole operating system! Give it a try, you dont even have to install it (use a Live CD). APPENDIX If your ISP blocks port 80 traffic, your webserver wont work. Before deciding that your ISP is blocking however, make sure your firewall has the appropriate rules to allow incoming traffic.

http://linux-blog.org/host-your-own-domain-website-and-webserver/[9/20/2011 7:23:18 PM]

Host Your Own Domain, Website and Webserver | Yet Another Linux Blog

You can do a quick add to IPTABLES in the following manner: 1 1 iptables -A INPUT -p tcp --dport 80 -j ACCEPT iptables -A INPUT -j DROP

If youve opened up the appropriate ports and things still dont work, it will be safe to say that youve determined the ISP is blocking port 80. How you can get around this conundrum is to switch the listening port on the webserver to a different one and redirect traffic there. 1. See how to do this for IIS Webservers 2. See how to do this for Apache Webservers (normally in /etc/apache2/httpd.conf but your distro may vary.) 3. See how to do this for Abyss Webservers If you still have problems, drop me a line in the comments section. I may not be able to answer all questions but I can most likely get you to a person/place/thing that can. Have fun and thanks for reading! This content is published under the Attribution-NoncommercialShare Alike 3.0 Unported license. No related posts. Related posts brought to you by Yet Another Related Posts Plugin.
This entry was posted in Misc, Tips and tagged Apache, host, linux, server, tip, tips and tricks, Webserver, website, windows by devnet. Bookmark the permalink.

About devnet
devnet has been a project manager for a Fortune 500 company, a Unix administrator, a Technical Writer, and a System Analyst during his 10 years working with Technology. View all posts by devnet

http://linux-blog.org/host-your-own-domain-website-and-webserver/[9/20/2011 7:23:18 PM]

Host Your Own Domain, Website and Webserver | Yet Another Linux Blog Like

Login Add New Comment

Please wait

Sort by popular Sort by popular nownow

Showing 10 comments
Derek Radz

How much traffic do you think this would allow, I have 1mbps uploads and 10mbps uploads and would be running it off a dual core 3ghz Linux machine with 2gb of RAM (would be dedicated to web hosting)
1 week ago
Derek Radz

Like Reply

When I said 10mbps uploads I meant downloads


1 week ago in reply to Derek Radz
devnet

Like Reply

You wouldn't survive a slashdotting, that's for sure :) It would be fine for a static HTML site and even a small wordpress blog. But as time goes on, you'd find your page views increasing and would feel the strain. It's probably fine for starting out though...and I'd only do it if it was a DSL or FiOS line...because with cable you're going to have to share with your neighbors and that can throttle your site speed.
6 days ago in reply to Derek Radz
Dreamblvr

Like Reply

I want to start a small local business and damn, I wish I understood any of this.

http://linux-blog.org/host-your-own-domain-website-and-webserver/[9/20/2011 7:23:18 PM]

Host Your Own Domain, Website and Webserver | Yet Another Linux Blog

Thank you for the interesting read. Do you make house calls?
2 weeks ago
Zachary

Like Reply

How to did you get you website to go mobile if you host your own any help will be thank
9 months ago
firma remontowo-budowlana Krak

Like Reply

You have absolutely right.


1 year ago
Joey

Like Reply

Want to host my own website a newbie on too but I'm still newbie on this. Will be trying your tips!
1 year ago
Mr. Man

Like Reply

For whatever reason whenever I try to go to my website (I'm using IIS on Win XP Pro) it gives me one of those generic search portal pages. Any ideas?
1 year ago
devnet

Like Reply

Sounds like DNS hasn't switched over yet. It may take up to 24 hours for DNS to replicate out and your records to be updated. Give it time and see if it works. You can also switch your local DNS to use google's at 8.8.8.8 and 8.8.4.4 instead of using your ISP's and see if it makes any difference.
1 year ago in reply to Mr. Man
littlebear

Like Reply

thanks, I didnt' know the iptables one, i used firestarter :P


1 year ago Like Reply

http://linux-blog.org/host-your-own-domain-website-and-webserver/[9/20/2011 7:23:18 PM]

Host Your Own Domain, Website and Webserver | Yet Another Linux Blog

M Subscribe by email S RSS

Trackbacks

Trackback URL

http://linux-blog.org/host-your-own-domain-website-and-webserver/trackback/

How to Host Your Own Website and Webserver | Yet Another Linux Blog 02/13/2010 02:33 PM [...] Host Your Own Domain and Webserver Posted on December 13, 2008, 3:42 pm, by devnet. Hello there! ...

Proudly powered by WordPress

http://linux-blog.org/host-your-own-domain-website-and-webserver/[9/20/2011 7:23:18 PM]

S-ar putea să vă placă și