Archive for the ‘Sysadmin’ Category

Fixing up Narcissus’s server

Sunday, March 8th, 2009

Right, I’ve spent most of the weekend sorting out various Apache/DNS/VirtualHost issues on Narcissus’s new VPS. He’s got five IP addresses pointing at his VPS, and randomly assigned them to the various sites hosted on the server… I wasn’t best pleased with this, so split the sites into various categories, assigned them an IP address based on that, and redid the DNS.

After sorting that lot out, it was time to sort out the filesystem locations where the sites were being hosted. The VirtualHost directives were originally pointing at content in ~user/public_html. I find that this has a number of issues, especially when the user wants to have multiple subdomains, and also when users want to put actual content in their ~user/public_html to be made available via http://foo.bar.com/~user. It is also a lot less centralised, and especially in cases where the user has no account on the server, can lead to a lot of unused user accounts, which I consider to be a security liability. As such, I prefer to host sites in /var/www/$site_name/htdocs with their logfiles stored in /var/www/$site_name/logs. This leads to a system which is much easier to manage as all the sites are centralised. If a user needs to make changes to their site, there’s a symlink created to ~user/sites/$site_name, which leads back to the site in /var.

So, we hacked together a quick script to move sites to the proper location, update the httpd.conf, and ran that, which solved the “problem” fairly quickly.

After doing all of that, I decided to get some content up on our new house website (the group of students I’m living with next year decided to make a website for the house, with aggregated blog feeds, house rules, news, forums (for debating issues and so on), and various uses like that. I decided to use Drupal as a CMS, as I decided it offered most of the functuality which I needed, and have been working on getting that up and running. I’ve still got to sort out the aesthetics side of things, but it should be up and running properly sometime soonish, at which point, I’ll announce it to the world. :)