Archive for the 'on technical stuff' Category

DNS and Name Servers

Saturday, May 24th, 2008

I finally got around to getting my domain names to work with my server.

At first I thought that I should just be able to register my domain name and have it point to my static IP address that I use for my server. But, then I remembered that I we don’t put an IP address for the server, but instead, we put in name servers. Sometimes name servers can be IP addresses, but more often than not, they are domain names themselves.

So, I had to study up a bit on DNS and name servers before I could get it set up correctly. The more I studied the more confused I seemed to get. I really do want to learn more about it, but I will leave the most of it for another day. I figured it out enough to do what I had to do to get it working. That’s all the brain power I had for today :)

When someone looks for my domain name, that domain name has to be on a name server somewhere. I must tell my registrar where my domain name servers live. Sometimes your domain registrar can and will handle your DNS. This means that your registrar is also your name server. So, basically, your name server is whoever handles your DNS records.

My registrar also handles my DNS records. So, I had to park my domain name at my registrar and then I could go in and manage my own DNS records. Sometimes this costs a little more at your registrar or at your host, but it’s not much more.

I had to add an A record to my DNS to point the domain name to my static IP address.

On my server, I had to add the domain name and static IP address in my /etc/hosts file.

I also had to add the Virtual Hosts information to my apache config files. For my setup, this was a file named 000-default in the /etc/apache2/sites-enabled directory. I added the following:

<virtualhost 123.456.789.012>
ServerName example.com
DocumentRoot /var/www/
<virtualhost>

Once I added this to my 000-default file, I restarted my apache server. That worked!! I can now get to my website using my domain name!

Next I wanted to be able to host more than one website on my server, so I changed the file to this:

NameVirtualHost 123.456.789.012

<virtualhost 123.456.789.012>
ServerName example1.com
DocumentRoot /var/www/website1
</virtualhost>

<virtualhost 123.456.789.012>
ServerName example2.com
DocumentRoot /var/www/website2
</virtualhost>

Again, I restarted my apache server and now I can get to both websites on my server. Oh, by the way, I did change the A record in the DNS for both domain names.

What a rewarding feeling to know that I now have my own websites hosted on my own computer!! And I know a little more about name servers and DNS :)

Making My Static IP Work With My Web Server

Wednesday, May 14th, 2008

I finally got my static IP address from my ISP, hooked up the modem, router, and computers but still I couldn’t access my website from the outside world. When I typed in the static IP address, it would just sit there and finally time out.

I tried it with the Ethernet cable coming from the modem to the router and then to my linux computer - that didn’t work. So, I tried it with my ethernet cable coming from the modem straight to the linux computer and then another ethernet cable from the modem to the router for all the other computers in the house. That didn’t work either. So, now what?

I talked to my friend, Dean, at work, who is the smartest person I know when it comes to networking. He even drew me pictures. :) But, the one thing he told me that did the trick was how to set up my network interfaces file on the linux box that will let it know it’s static IP address. I’m sure I would have found that in a book or online if I’d looked long and hard enough, but it’s always nice to have a ‘Dean’ to save you from all the trouble. :)

So, I added my static IP address, gateway and subnet mask that was given to me by my ISP to the /etc/network/interfaces file and then ran ‘/etc/init.d/networking restart’ just like Dean told me. And, guess what? It works like a charm! I didn’t even have to get an extra networking card like Dean said I might. And I didn’t have to get another static IP address like Dean also said I might need. I just had to add the right stuff to the right file. :)

I installed SSH so that I can shell in from anywhere and now everything seems to be running well and I can now access my Linux box from anywhere with internet access.

Thanks Dean!

Restoring My WordPress Theme & Customization

Saturday, May 3rd, 2008

That was even easier!

I just deleted the new wp-content files and then uploaded my old wp-content files.

Everything seems to be working perfectly.

Now to get my apache web server installed on my home computer. Then I’ll install php and mysql and attempt to install a mail server. If all that goes well, I’ll move this website over to my home computer.

How exciting is that??

Upgrading to WordPress 2.5.1

Saturday, May 3rd, 2008

Now, that was easy!

I first copied all my wordpress files from my website to my local hard drive for safekeeping.

Then I deleted all the files from my website.

I then downloaded the new version from WordPress and uploaded them to my website.

I ran the wp-admin/upgrade.php which upgraded my database.

When I tried to view my website the first time, it told me that my configuration file was missing so I copied it up to the website.

And then, my blog came up just fine!

Now, I’m going to try to get my customization back by copying the wp-content file back up. We’ll see what happens!