How to setup a machine to host my websites to the world - with my own url?

5,347

Solution 1

Setting up a webserver on Ubuntu is very easy to do you can either use apt-get and install Apache, PHP and MySQL manuall or use tasksel to install the LAMP stack.

sudo tasksel install lamp-server

https://help.ubuntu.com/community/ApacheMySQLPHP

Once that's done you'll be able to setup your blog on the local machine and get it running.

You can follow the guide here for how to install wordpress under Ubuntu or follow this one for a generic guide on how to get installed.

--

Next steps

  • Buy the domain (I get mine from 123-reg.co.uk)
  • Point domain to your IP address
    • If you have a static IP simply point the domain to that IP.
    • If you don't have a static IP you'll need to use a service like dyndns to update the DNS records as your IP changes.
  • Depending on your network setup you will then either need to use port forwarding to forward port 80 to your machine running apache or use NAT on your router to connect your public IP address to the IP of your machine.

--

Some other points

  • You would be better using Ubuntu Server if possible on the machine as its more designed for the task and there is no need for a GUI on a web box.
  • If your website / blog becomes popular you may find your internet connection is not capable of handling the load as most home internet connections do not have very good upload speed.

Solution 2

Wordpress is in the universe repository. You can install via apt-get or synaptic and all the dependencies will get pulled in. More documentation here.

To host a server, you need an ISP that gives you an external static IP address, which most do, but you usually have to ask for a static IP. Then it's a matter of getting a domain pointed to that address and opening a hole in your firewall.

Solution 3

If you are doing this for the experience or fun of it, rock on.

If you are doing this because you want to have a reliable website, don't bother. Homes make lousy datacenters for the same reason that website hosting costs money: ensuring the power stays up, the net stays up, the server and the applications are up is capital and labor intensive which is most efficiently amortized across a server farm.

Some routers support a "roaming" DNS server like http://www.dyndns.com/ which allows you to maintain a static name even though your ISP may shuttle your IP address around dynamically, but the caveat of "this may irritate your ISP" does apply.

(disclosure: I have a free DynDNS account for no really good reason, it works on the odd times I've tried it, I don't use it for anything important, my ISP is very liberal and I have no connection to DynDNS aside from that.)

Share:
5,347

Related videos on Youtube

myusuf3
Author by

myusuf3

https://mahdiyusuf.com

Updated on September 17, 2022

Comments

  • myusuf3
    myusuf3 over 1 year

    I have been playing around with my blog, alot. I have couple of old computers laying around i want to put to use.

    I was wondering if there is a way to setup a server, then will be linked to a url that i buy and server pages and maybe even install wordpress.

    Any information on setting that up on Ubuntu 10.04 Desktop would be amazing.

    Please and thank you.

    • Admin
      Admin over 13 years
      Why do you want to set that up on Ubuntu Desktop?
    • Admin
      Admin over 13 years
      Before you even attempt this, make sure you're not violating your telephone company's terms of service by doing so.
  • myusuf3
    myusuf3 over 13 years
    thanks for the help. I have 50MB - down and 2MB - up is that good enough? How much traffic could that potentially handle?
  • Nathan Osman
    Nathan Osman over 13 years
    @garbage: Wow. WhatI would give for 50MB/s downstream!
  • Erigami
    Erigami over 13 years
    With dyndns I don't believe you need a static IP.
  • Ben Crouse
    Ben Crouse over 13 years
    I have a similar connection 50MB down and 1.5Mb. I can't give you a precise figure on how much it can handle, I have run test websites on it but that has only ever been for 1 or 2 people to look at. Hosting a bigger site would really depends on your site, the number of simultaneous users on it and what else your using the connection for at the time.
  • myusuf3
    myusuf3 over 13 years
    @george its nice when downloading :) @Mark Thanks!
  • user3707805
    user3707805 over 12 years
    2MB up is not sufficient; you would need a higher upper bandwidth limit. Don't forget you'll be sharing that 2MB with other machines on the network, and other programs on your server.