How-to: Basic informtaion to get a GoDaddy site working on a Ubuntu server

Here’s what I needed to do to get my custom domain name from GoDaddy working with this Wordpress instance on an Ubuntu 9.04 server. After installing and setting up Wordpress, which was mostly easy, I needed to get this custom domain name working as well. The first thing that I needed to do was to edit my /etc/hosts file. When I installed Ubuntu, I just okey’d the default networking settings, which set my domain name as So I had to change that to, to match this website. I also changed the IP address in the hosts file from, a loopback address, to its real local address, To finish the /etc/hosts file part, I ran these two commands: echo > /etc/hostname and /etc/init.d/ start. Then I needed to change the settings of my Apache webserver. The first thing that I changed was the document root, so that it was actually serving up my Wordpress site instead of placeholder “It works!” that is in the default installation of any Apache webserver. After I changed the document root to “/usr/share/wordpress”, I had to add the ServerName and ServerAlias fields so that it would actually run as “” and “”. So I added: ServerName ServerAlias into the top of the VirtualHost area. This actually doesn’t work, so far as I can tell, with Wordpress. I want to figure out how to get it so does actually redirect to, but I haven’t figured it out yet (and borked my server trying). To make my site accessible to the world, I only needed to change a few more things, all in my GoDaddy DNS settings. In the “Total DNS Control and MX Records” page, I changed the Host to the IP address of my server, and changed the “www” alias to “”. And then that was that! This will prove useful for me if/when I ever install a new server, and I hope it can be useful to anyone else installing a server. I couldn’t find a really simple explanation of how to get a custom domain name working on a personal server.