Tag Archives: Web hosting

Transferring web hosting service

It’s been a while since I last blogged. This time it’s about time to renew my web hosting service. At this current economic climate, USD200 for two years of service seems like a lot now. I have gone through web hosting service provider change for a number of times. But I still managed to get the DNS wrong, somehow. It should be a simple straightforward copy from the previous hosted zone file to the new service.

Okay, for my own record, as well as for others as well I guess, I have complete control over my web server now. I always have about two websites to manage. But as I figured out lately, it is called name-based virtual hosting that I have been using. So web access to my website will be based on domain name, not IP address. Because I have more than one websites hosted based on just the one IP address, accessing the IP address would not return me the desired webpage. The virtual host configuration is such that access, based on domain name, will get served documents from the document root as stated in the configuration. Okay this is clear to me now.

However, when managing my hosted zone, for domain name translation, I used a CNAME record for www (i.e. www.mylearningdiary.com) that pointed to the IP address of my web server.  That gave me a NXDOMAIN error, or non-existent domain error, everywhere. I initially thought that was to do with propagation delay after switching the DNS, at the registrar, to point to the new domain name servers. This is well known, so I patiently waited, and checked, and tested. But still couldn’t access my website. After a day or two, I trawled the Internet, and then started using dig, a network administration command-line tool for querying the DNS, which I have used before long time ago, to check what was going on. Dig is more helpful than nslookup, that it not only showed me the error, but it also showed me that I actually got the IP address returned when querying for the www CNAME record. That was useful enough for me to know that my DNS servers were responding to the CNAME query, just not good enough for me to reach my website. Instead of IP address, the domain name, i.e. mylearningdiary.com, should be used for the CNAME record.

Now the website is finally back up running again,  I need to try setting up the mail forwarding. Hopefully without me having to set a mail server.

Transfer to a web hosting service

Couldn’t help but to buy myself a two year web hosting service with hostmonster for less than $120. It gives me all I’m looking for, ssh access, mysql database, hosting unlimited domains etc, and I’m also given a free domain name during this period! Have to say goodbye to using my old home PC to host this blog, as switching on this machine 24/7 mainly just to do that is not very environmentally friendly 🙂 And if I continue to do this it won’t be long before I’ll kill my PC. In fact recently the PC switched off itself and had problem booting back up again . I initially thought it was about time to dispose of the PC. But turns out that the power supply unit (PSU) was just clogged with dust, no ventilation, overheated and then switched off itself. I gave the PSU a good vacuum and it’s now back up running again. Anyway, I still need the PC to work as a wireless router as well as a file storage system, so don’t really want to f**k that up. The process to transfer this blog to the hosting server was easier than I thought. I only need to copy the whole web directory to the hosting server, set up a new mysql database (user name, password and database name), modify the corresponding mysql parameters in wp-config.php, change the domain name server and that’s it. Easy peasy.

Web hosting service

I always have this question in my mind on whether hosting this blog on my home machine is such a good idea afterall. My web server is slow, because the uplink speed of my ADSL connection is only 256Kbps. I have no backup power supply, and my server is not secured from denial of service attack.I recently bought a two-year service with IX web hosting for my travel business project. It’s cheap but the service plan is surprisingly very generous. I get 1,000GBytes allowance for data transfer every month, which should be more than sufficient although I have lots of pictures on my website, and 100GBytes of webspace! When I did my research on which web hosting service to go for, I found that many of them have very limited allowance for data transfer. They may be very cheap, but they charge a lot when the allowance is exceeded (so look carefully at the small prints!). Another thing to watch out for is the customer support. Some web hosting companies have appalling customer support. And some are just resellers. For example they bought a dedicated server service from a web hosting company, and then resell spare capacity to other people. So although their service may be cheap, it’s probably difficult to expect much from them. The only consideration for me when I signup with IX web hosting was that they do not provide secure shell (ssh) access to the web server. But I’m glad it turns out that their web shell service is user-friendly enough. And I can still run scripts using crontab. So looks like maybe I should transfer this blog to IX web hosting as well. BUT, the challenge of administering my own web server is too hard to let go, afterall 🙂

Finally up and running

What should normally take 5 minutes to set up ended up taking me days! To be fair to wordpress, if you are using a third party web hosting service, it shouldn’t really take you much time to get wordpress installed and there you can start blogging. I know I should shoulder some blame as well, as I tried to host this website on my home machine, which wasn’t equipped with php and mysql initially. But to later find out that it was actually a simple mistake in the wordpress package that was preventing me from getting this done sooner was absolutely deflating. That closing php tag, which was one short in the install script, was costly because it confused me into thinking, for days, that my web server wasn’t configured to work as required by wordpress, which uses php and mysql. But on a positive note, much was learnt during the process, as is always the case when you play with Linux. Avoid using pre-compiled binaries if you have multiple packages that you want to link together. Compile from source always gives you control over what you want and don’t want.