Thinking about the Ubuntu Forums

2008 December 2
by Ryan

It’s been just over 4 years since I started the Ubuntu Forums and tonight I found myself thinking about it’s life-cycle, my frustrations, the forum council, current staff, ex-staff, the community, ownership changes, Canonical and the interesting conversations that took place in its younger years. I’m glad to still be apart of it and look forward to what the future brings.

I also want to say thanks to the dedicated staff and the community who make the Ubuntu Forums what they are.

A little history of the forums from it’s first launch and today

Install nginx w/ php5 on Ubuntu 8.10

2008 December 1
by Ryan

Below are the steps I took to configure nginx and php5 on my Ubuntu 8.10 server. I choose nginx because its lightweight and relatively easy to manage once you figure out the configuration. I’ve been using Apache for years and its second nature at this point, however, on my small VPS server I needed to maximize my resources.

Make sure your system is updated:

sudo aptitude update && sudo aptitude safe-upgrade

Install nginx and PHP5, we’ll be installing the cgi version of php.

sudo aptitude install nginx php5-cgi

Download the following php-fastcgi startup script and save it to /etc/init.d/php-fastcgi. Nginx will use php in cgi-mode which is why we are creating a init file for it. (note: I found this init script on a mailing list someplace)

Download: php-fastcgi init script

Next, run the following commands on the php-fastcgi script.

sudo chmod u+x /etc/init.d/php-fastcgi
sudo chown 0.0 /etc/init.d/php-fastcgi
sudo update-rc.d php-fastcgi defaults 21 23

Now, go ahead and create your directory that will store your website. For example you might do the following:

mkdir -p /home/username/domains/yourdomaincom/{public_html,log,cgi-bin}

Modify the /etc/nginx/nginx.conf file and set the following variable. I have mine set to 15MB but if you wish to allow larger files to be uploaded over http set this accordingly.

client_max_body_size 15m;

Finally, lets setup a virtual domain. Navigate to the /etc/nginx/sites-available directory and create a file called yourdomain.com (replace with your domain) and use the following as a template. Make sure to replace your paths etc.

server {
listen  80;
server_name  yourdomain.com www.yourdomain.com;

access_log  /home/username/domains/yourdomain.com/log/access.log;

location / {
root   /home/username/domains/yourdomain.com/public_html;
index  index.html index.htm index.php;
}

# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ \.php$ {
fastcgi_pass   127.0.0.1:9000;
fastcgi_index  index.php;
fastcgi_param  SCRIPT_FILENAME  /home/username/domains/yourdomain.com/public_html$fastcgi_script_name;
include fastcgi_params;
}
}

Like apache, nginx has a sites-available and sites-enabled folder this allows for better control of active/disabled virtual domains. Navigate to the /etc/nginx/sites-enabled folder and create a symlink back to your virtual host’s configuration.

cd /etc/nginx/sites-enabled/ && sudo ln -s ../sites-available/yourdomain.com

Finally, lets start everything up.
/etc/init.d/php-fastcgi start
/etc/init.d/nginx start

At this point you should be able to browse to your site using your domain name. You can easily duplicate multiple domains by creating new virtual host files and creating the sym link as noted above, remember that ngix will need to be restarted.

Hosting with slicehost

2008 November 30
by Ryan

I decided to move my blog and a couple other websites I maintain to an Ubuntu 8.10 based VPS/slice at slicehost.net. For various reasons the shared hosting provider I was using wasn’t fitting my needs, specifically there was downtime and performance issues.

I choose to start with slicehost’s “256 slice” which gave me 256BM ram, 10GB storage and 100GB of monthly transfer. I opted to install Ubuntu 8.10, although there are other Linux flavors available. The install took about 5 minutes and Slicehost’s control panel allows me to rebuild my slice anytime, view stats, login to a console and much more.

Since I choose to start with the smaller 256 slice I needed to make sure I wasn’t going to max out my resources since I need to have specific applications installed to maintain my blog. I decided to go with nginx as a replacement for apache2, mysql5, php5 and postfix to handle sending mail.

It’s only been a couple days since I made the switch and so far slicehost is really working out for me.

Edit: I stumbled on Slicehost when researching Linux HA for work. Slicehost has a nice write up on using HA with multiple slices. :)

it’s been awhile..

2008 November 12
by Ryan

It’s been a month since I last posted and during that time my wife I took a trip to Vermont to accomplish a few goals, run a marathon and visit her family.

We set off to run the marathon on a Saturday morning, it was cold, around 30-35 degree’s and sunny. Around 8:30am the race started and we paced ourselves for a 12 minute mile, about 2 hours and 30 minutes into the race we reached the half way point (13.1 miles).

We were feeling pretty good at that point since we had ran that distance many times during the summer, however, around mile 19 or 20 I hit the “wall” so to speak its and odd feeling when you body just stops running and you unconsciously start to walk.  I am about 2-3 miles ahead of my wife at this point, we made a pact that we would go ahead of each other if we felt like we could, I did.

Around mile 21 I met up with an awesome lady named Dorthy, her spirit and positive energy got me through the last 5.2 miles of that marathon and I’ll never forget the time we ran together. She’ll probably never see this blog, but I just want to say thanks Dorothy. Dorthy and I finished 1 second apart, I was dehydrated, delusional and I was trying to comprehend how my wife was already at the finish line. Come to find out she made it 19 miles before she had to stop, I was proud of her for making it that far.

I finished the marathon, 26.2 miles in just under 5 hours and 30 minutes, all those months of hard training actually paid off.

The marathon was around Lake Champlain here is a picture of the sunset there.

image003