Jon Simpson

From Shared Hosting to Dedicated

9 Jul 2005 — webhosting, dedicated servers, debian, linux

For a while now I’ve been working in the internet field, with a few websites that make a tidy sum of money each month. For a long time they have all been hosted on a shared account I’d had for some time, which had previously been used for small personal projects and had mostly been co-opted into doing the job for the bigger and demanding sites that were increasingly coming up. Having the fate of my business critical web applications out of my hands was beginning to be a bit of a worry, so I decided to move all the sites to a dedicated server over at ServerBeach. I thought I’d post up a few interesting notes on the transition, as its not one I’ve seen commonly documented.

All of the sites I run have been designed for a shared hosting environment. The earlier ones were mostly run under cPanel for a long time, and more recently DirectAdmin was in control of the shared environment they were running in. Both of these control panels have their own quirks and configuration issues (my web applications use a lot of URL writing tricks, some of which seem particularly susceptible to breaking with non-standard apache configurations). A lot of the code had been ported from a cPanel environment to a DirectAdmin environment, so during that transition a lot of cleanup had been done to use ‘good practice’ techniques that worked better, and remove any configuration dependence in the code.

With all that said, I was understandably pretty confident about the webapps being pretty straightforward to take to any Linux/Apache/MySQL/PHP combination environment. What I wasn’t quite banking on was the lack of support from a bare Debian Linux configuration. When you’ve used cPanel/WHM combinations for a long time, you tend to forget the complexities involved in having a lot of name-based virtual hosts, log rotation, statistic generation, providing secure access to services like phpMyAdmin and the like. Sure enough, getting all that stuff up to scratch has been pretty hard, but the benefits of having everything just how I want it are worth it to me.

After getting access to the server, I immediately upgraded the apt repository and did a dist-upgrade to the latest stable, knowing that it was running Debian 3.0 and 3.1 recently went stable. I’m not a great Debian follower, so I can only hope by keeping up to date with the latest package releases I should be able to avoid major security problems in outdated packages. My philosophy was to try and use as many apt installed packages as possible, to benefit from the automatic updating, and as such apache, mysql, php and other key packages all came from Debian binary packages.

I have a structure set up for the virtual hosts that allows for individual usage logs, and as such I chose to have individual stats generation for each domain via awstats (which proved quite tricky to set up, but was eventually manageable) and obviously had to configure the log rotation to deal with all of the different log files involved in the new configuration. I’ve learned a lot of Linux & Debian in the last couple of days, and its reminded my why I continue to use OS X on the desktop instead of Linux. Being dependent on apt for everything is a strange world when you’re used to being able to open Terminal.app on OS X and cherry-pick the ‘best-of-breed’ unix apps through fink or darwinports.

I’ve left this article deliberately shallow on technical detail, mainly because I’m actually using this server in production, and I don’t exactly want to go around shouting exactly where everything is located on it and what protections are in place. Suffice is to say I’ll be continually tweaking and improving things with the set-up, and trying to find performance enhancements (PHP seems a bit slow out of the box, so I’ll be looking at that for starters).

As for ServerBeach, I would recommend them to anyone looking for a dedicated server, their support are really helpful and they even waived the set-up fee on my box to clinch the deal. Their bandwidth quotas are generous and their pricing compares favourably with competitors (I spent 2 months off and on looking around at dedicated server deals).

That’s it for now, comments/questions welcome below, and there’ll probably be further comments forthcoming as I discover new issues and problems. (There’s been a fair few ‘eureka’ moments in getting where I am right now..)

Comments


Hey there Jon,

I noticed your account just suddenly stopped using bandwidth so I got curious and found this. Good luck with your new dedicated server, hopefully you can get your sites running with a nice profit. Hopefully my services have helped you a little to get where you are today.

Best Regards from your previous webhoster,

Patrick Hansson, 11 Aug 2005



 Home