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 nc.rr.com. So I had to change that to shadeball.org, to match this website. I also changed the IP address in the hosts file from 127.0.1.1, a loopback address, to its real local address, 192.168.1.105. To finish the /etc/hosts file part, I ran these two commands: echo grainger.shadeball.org > /etc/hostname and /etc/init.d/hostname.sh 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 “shadeball.org” and “www.shadeball.org”. So I added: ServerName shadeball.org ServerAlias www.shadeball.org 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 www.shadeball.org does actually redirect to shadeball.org, 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 “shadeball.org”. 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.

Leave a Reply