Ubuntu – How to host a domain/website on the new VPS


I am an average Ubuntu user and currently i decided to strengthen my knowledge in Ubuntu. Since i am a web developer, lately i decided to setup my own web server powered by Ubuntu.

I just bought an unmanage VPS powered by Ubuntu 11.10. I have managed to install the Apache, PHP, MySQL and the basic security changes.

Previously, i was just a shared hosting user where everything is managed via cPanel which is easy. Now is totally different and i am clueless since i am on unmanaged VPS and of course the hosting company will not help me.

My question:

Previously, when I want to host new website, after I purchase a domain from registrar I will change the domain nameservers with my sharedhosting nameservers I just add the domain via cPanel. How can I host a domain/website on my new VPS? How to have a nameserver? How to setup the nameserver?

Best Answer

There are many "reasonable" and "practical" ways to go about hosting a website using your domain name on a VPS running Ubuntu.

I offer this guide for a straight-forward walkthrough on setting up a hardened Ubuntu LAMP Server to power a site: http://blog.al4.co.nz/2011/05/setting-up-a-secure-ubuntu-lamp-server/

In regards to setting up a Nameserver.... Just don't do that :) use the free dns services offered by most registrars or use a service like Afraid.org or Cloudflare to handle DNS.

Related Question