Diving into Web Hosting-- Beginner (Ubuntu)

Posted September 9, 2014 6.9k views

I’m just beginning web development. I know (to an extent) the fundamental languages (Html, CSS & JavaScript). But I haven’t hosted a webpage before or rather i haven’t managed a website before and i think for now, i should be diving into that (I plan on learning PHP and a CMS later).

I want to learn the basics of hosting a website without actually having a public website yet. I am actually thinking if it possible i can have this private server set up on my PC which i can use to host my developed webpages for the purpose of viewing them on other devices, just like i’m hosting a real website but this time around it is just for testing purposes.

I haven’t registered a domain name yet before. I don’t know if it is possible to have a virtual domain name too.

I run Ubuntu 14.04 (I just installed this recently, I am still learning to use it.) and windows 8 on my machine.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
3 answers

Hi Idris,

Welcome to the Digital Ocean community and to web development. I’ll try to address your questions.

  • Is it possible to have a local server on your machine, serving websites accessible from the network?

Yes! You can install a web server on your local machine. For example, you can install the LAMP suite (since you’re aiming to learn PHP). The web server will serve pages on localhost at a specific port. You can use this port and your IP to access your machine from other devices and view the website(s) in the browser.

  • What about the domain name?

First of all, for testing and learning purposes you do not need a domain name. If you want to learn how DNS works without spending money for a domain, you can register a free one (there are plenty free domain registrars on the internet). Finally, you can register a paid (and nice looking) domain from registrars like or

Since you’re asking the question on the Digital Ocean forums, know that there are plenty of hosting options on DO. Once you’ll have a functional website, you’ll want it to be reliably available to the public and a VPS on DO is just good for that. You can even create a droplet already configured with Ubuntu 14.04 and LAMP, so deployment will be a breeze. Check the tutorials in the community, they are great.

On your windows, you can install VirtualBox and then download a Ubuntu ISO File. You’ll then be able to create a Virtual Machine that will be exactly like your droplet.

Then, I suggest you to look at this tutorial that will explain how to setup a Web Server using Ubuntu.

by Etel Sverdlov
This tutorial explains how to install Apache, how to install MySQL, how to change the root MySQL password, how to install PHP, and how to see what libraries are available. LAMP stack is a group of open source software used to get web servers up and running. The acronym stands for Linux, Apache ( the web server) , MySQL (the database), and PHP (the language). This tutorial is written for Ubuntu.

Hello Idris, ofcurse you can setup a local webserver on you machine (access it by localhost:80) and start diging into the web development. Personaly i believe its better to have a local enviroment on ubuntu if you’re planing to deploy directly or do it on a DigitalOcean VPS. You dont really need more than 512mb while you learning. However if you want to dig the debian/ubuntu world i warranty you that probably you will (somehow) corrupt the OS etc.. so its better to install it on WMware or VirtualBox do your tests and then come on DO and start making apps. If you want enything else do not hesitate to ask me :)