Well a common question is “How do I host my own website?”
The simple answer is: easily 🙂
There are a couple of steps to hosting your own website:
Install Ubuntu (www.ubuntu.com) – Download the desktop version
Install Apache – Open terminal and type the following command: sudo apt-get install apache2
Once Apache is installed, you can check to see if things work by opening your web browser and heading over to the ip address of the ubuntu machine. i.e open up firefox and type in 192.168.2.87 (or whatever the ip is). You should get a page saying “It Works!” – once you’ve got this far you can move onto the next steps
This is an important step as it will allow the rest of the Internet to access your website – right now only people on your local network can access your website.
Get a dynamic hostname (this is something like you.homelinux.com, you can register for one of these at www.noip.com or www.dyndns.org) – this is necessary because your ISP assigns dynamic ip addresses at random intervals and the hostname is then used to point to the newly updated ip address
Once you have your dynamic hostname, you need to input dynamic dns settings in your router, its normally under firewall, or wan categories. You input your dyndns or noip username and password and your router then updates your hostname with the newly assigned ip address. Some routers don’t have this functionality, so you may have to download a dynamic dns updater – the Ubuntu website provides instructions on how to do this, as well as register for a dynamic hostname if our instructions weren’t clear enough: https://help.ubuntu.com/community/DynamicDNS
The final step is to forward port 80 on your router to the ip address of your ubuntu machine where the web server is hosted. In order to make your life easy, first set a static ip address for your ubuntu machine, that way you know which ip address to forward incoming traffic on port 80 to. Port forwarding instructions vary depending on the router model, but this can normally be found under “Virtual IP” or Firewall -> Port Forwarding. Wikihow provide a quick a dirty guide on port forwarding: http://www.wikihow.com/Set-Up-Port-Forwarding-on-a-Router
Upload your website files to the directory /var/www in ubuntu. It can be done using the Terminal, but for those who like to use a GUI you can issue the following command in Terminal: *gksudo nautilus – *this will open up your file browser with root privileges and allow you to copy and paste the files you need to /var/www
In order to avoid your website being hacked gloriously, please set file permissions to 644 and folder permissions to 755 for your /var/www folder. You can see how to do this here
And that’s about all you need to host your own website for free. If you get stuck, comment here and we’ll try and help you out.