Welcome
Webserver woes and wows
8/11/09: jonathanHobbies

When I first created knez.org it was a means to an end. My goal was to learn PHP, a server side scripting language, and also get some experience with system administration. I started out hosting the site in Linux using Apache but quickly got fed up with always having to deal with .conf files and what felt like endless levels of weird problems and incompatibilities.

I switched to running the website under Windows XP and IIS. It was relatively painless to setup and administer. Very rarely did I ever need to login to the webserver to do anything. I just left automatic updates on and let it rip. I even setup an FTP and Email server in addition to the website.

Over time though the limitations of IIS under Windows XP Professional started to annoy me. For starters, it was not at all straight forward to host multiple websites on one computer. Secondaly, it was limited to 20 concurrent connections. Initially this was not a problem but recently web browsers have started running mulitple threads to download content, such as a page full of pictures, even faster. A single user can very quickly hit the 20 connection cap and start getting page errors.

All that lead to the conclusion that I needed a better webserver- either start using IIS bundled with Windows Server 2003 / Windows 2008 or give Apache another try. Apache is perfectly happy running on Windows and Linux alike but I have been on a real linux kick recently so I thought I would try setting it up in Linux.

I kept my Windows XP server up and running while I setup a virutal linux based CentOS server using VirtualBox from Sun Microsystems. Let me just take a second to say that VirtualBox is bad a$$. The concept takes minute to wrap your head around, you run a virtual computer complete with operating system as a program in your current operating system. I had played around with WMWare years ago and I must say virtual machines have come a long way- now supporting 64 bit OS, all sorts of networking options, and even allowing access to DirectX 9 apps on the guest OS. Using VirtualBox I quickly got CentOs running on a guest OS on my Ubuntu host machine.

My first priority was getting a website up a running. I dont know if Apache is just easier to setup or maybe my experience level is a bit different than 6 years ago but Apache was a breeze to setup. I would say it was borderline joyful how things just worked... and worked quickly too! Surprisingly, my seat of pants estimate is that the website actually loads faster running on Apache on a virtual machine that it did running on a dedicated Windows XP machine running IIS.

Here is a screenshot of my virtual CentOS server running on my Ubuntu host computer:

Even though the website was up and running in the virtual machine I still kept the Windows XP web server running. After all, I had yet to setup FTP and email on the linux server. I planned on taking my time to get things just right before transitioning to the virtual server.

That was until the harddrive on my Windows XP webserver failed. I unexpectdely found myself without email, FTP, or a functioning website. I powered on my virtual CentOS server, remapped port forwarding on my router, and viola, the website was back up and running! I love it.

Now it was time to turn my attention to Email and FTP. Long story short, I ended up using a Email server package called Axigen which I have been extremely impressed with. Eventually I will have to dedicate an entire blog post just to this wonderful piece of software. As for FTP, I ended up using VSFTPD, the Very Secure File Transfer Protocol Demon; a standard ftp server found on linux based machines.

Now that my virtual server was fully functional, I decided to try to rebuild my server computer. After all, running a virtual server on my day to day desktop is not ideal. I often encode movies with can be a big performance hit for the server virtual machine. I also dont always leave my desktop running.

I pulled the bad harddrive out of the webserver, reorganized the files on disks using a Live linux CD, and finally installed Ubuntu on it. Once I was up and running, I installed VirtualBox, imported my CentOS virtual server, and powered it on. I immediatly told me that my hardware did not support a 64 bit OS! What? Its a 64 bit processor running a 64 bit host OS?!? As it turns out my AMD Athlon 64 was too old to support the necessary AMD-Virtualization technology to allow me to run a virtual 64 bit machine. DOH!

My options were either to rebuild my CentOS server using a 32 bit distrobution instead of 64 bit, or upgrade my web server hardware. A quick look on newegg revealed that for about $250 I could get all the parts I needed. You can probably guess which direction I went, I am upgrading the web server hardware.

I ended up ordering an AMD Athlon II X2 processor. Its a dual core, 2.9 ghz, 45 nm chip. This will actually require far less power to run than my previous processor which is always nice for the always on server machine. Additionally it is dual core and should be a drastic speed boost over my old CPU. Best of all, it was only about $60! You gotta love the Intel vs AMD processor wars. I also picked up a Gigabyte GA-MA770T-UD3P motherboard. Not much to say about it except that has gigabit lan, 4 memory slots, supports AM3 processors, and has built in raid. It also has 2 PS/2 ports for the keyboard and mouse. That is important to me so I can keep my KVM switch, and surpirsingly not many motherboards still have two PS/2 ports. Lastly I picked up a whopping 8 gigs of DDR3 RAM. This will be a dramatic boost over my 1 gig setup currently. Memory certainly has come down in price.

All that is still on its way here via NewEgg shipping. NewEgg shipping is so fast that sometimes I swear they ship it before I even bought it, like they know exactly what I want before I do.

The website will probably be down briefly while I move the virtual machine from my desktop to the new and improve server machine. I cant wait!


Contact Us | ©2005 Me | Page best viewed with Mozilla Firefox