CategoriesUncategorized

Install nginx w/ php5 on Ubuntu 8.10

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.

[sourcecode language=’css’]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;
}
}[/sourcecode]

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.

CategoriesUncategorized

Green Mountain Marathon Vermont

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.

CategoriesUncategorized

we got another dog…

A family member of mine recently surrendered their dog of 7 years to the local vet. My wife and I have always talked about how we felt we could provide the dog with a better more stable home but never really knew how we could approach the situation without causing any unneeded drama.

Things got interesting when another family member I had stopped to visit was upset, I proceeded to ask what was wrong and got a heartbreaking story about how the dog had been surrendered to the local vet because they could not take care of her nor pay for the surgery she needed to have her bladder stones taken care of.

I wish they would have asked my wife and I to help them or take the dog we would of happily done so. My wife and I are big animals lovers we have 3 dogs and 2 cats already and sometimes its crazy but it’s well worth the enjoyment. When I found out I immediately went to the vet and asked if she had been adopted and offered to pay the $1000 to have her surgery taken care of if we could adopt her. The hardest part for me was knowing this poor dog had only known one family and was about to be given to someone else at the age of 7 it seemed heartbreaking to me to let this happen, since she knows us and loves our border collie.

The vet called me back this morning and OK’d the adoption, she is going to have her surgery on Monday and we’ll be able to pick her up on Tuesday. In the end I hope we’ll be able to provide her with a good home and the ability to run in a large yard and play with other dogs.

CategoriesUncategorized

Ulnar Nerve Transposition Surgery – Update 2

Just another update on this situation. During the past two weeks I’ve had increased dull pain in my arm, spasms/cramping in my left hand and the incision is still very swollen, discolored and sensitive. It actually hurts to type because my fingers lock up and get very tired.

I go back to the doctor on Sep 05, but frankly I am not very optimistic. I’m questioning rather or not this surgery was worth it….

CategoriesUncategorized

Ulnar Nerve Transposition Surgery

I figured I would take a minute and update my status after 3 months. My elbow is still very tender and hurts when touched in certain ways, like if its bumped or I set it down on a table. My arm is still very stiff and the elbow is numb as well, its a odd feeling and the tingling in my pinky and ring finger still persists.

I go back to the doctor next week and we’ll see what he says, my nerve was pretty damaged and when I visited a month ago he said I would most likely still see improvement 2-5 years down the road. All-in-All I am not sure the surgery was really a total success the aching has gone away but the numbness hasn’t and that’s the part I am having trouble getting used too.

I’ll try to keep up on my updates on a more regular basis since people seem to be interested in sharing their experiences on my previous post. 🙂

CategoriesUncategorized

Ulnar Nerve Transposition Surgery

On 3/17/08 I had surgery to correct a pinched nerve in my elbow. The pinched nerve was causing the pinky and ring fingers to be numb and tingle, also serve arm aching. Hopefully this surgery will correct the issue, however the pain right now is horrible. The nerve was relocated to forearm under the muscle. Here are some pictures of my arm taken 4 days after surgery.

CategoriesUncategorized

Macbook Pro & Netgear wnr834b

I decided to take advantage of the wireless n adapter in my macbook so I purchased a Netgear WNR834B from a local retail store. The Mabook Pro seems to have issues with the Netgear wireless router it will make a connection (ie show its connected) when coming out of sleep mode but it will not connect to the internet. Everything gets assigned but the route on the OS side.

After I made these two changes on the router things improved.
1. LAN IP Setup – Change “Rip Direction” to “Both”
2. In Wireless Settings change the channel to something other then “auto”. I picked 10.

Now when my macbook comes out of sleep mode the wireless works and I can surf at least 8/10 times.

CategoriesUncategorized

Ubuntu Desktop Upgrade

My upgrade from Ubuntu 7.04 to 7.10 went very smooth today. I am pleased to say I am running the RC of gutsy now on my desktop.

CategoriesUncategorized

MacBook Pro 2.4ghz Review

After much contemplation I decided to go out and upgrade my first generation MacBook Pro to the latest and greatest! And I am not disappointed at all. Lets get down to the nitty gritty and the juicy details shall we?I opted for the 15in model with a glossy screen, 2.4ghz Core 2 Duo, 2GB ram, 160GB storage and the Nvidia GeForce 8600M GT 256MB graphics card.

LCD/Screen: I had some serious concerns with getting the glossy screen vs the matte screen because of the possible glare issue. Now with the glossy screen there is some glare especially when the screen has a dark background I noticed the worse on black, but seriously it’s nothing to be concerned over. The image quality and brightness compared to my first generation MBP is 100x improved I’ll chalk this up to the new LED lighting the 15in MBP is using. Some people have been reporting grainy looks to their LCD’s, I don’t seem to have this problem.

RAM/Storage: I opted to get the default 160gb 5400 RPM, sata hard drive. This was another point on contention for me, I really wanted the 7200RPM drive but the apple store did not carry those and it was configuration option online only, so they told me. The extra speed would have been nice but I am not going to loose sleep over it. I also opted to get the standard 2gb ram and upgrade it to 4gb myself for half the cost, I purchased the 2x2gb upgrade from crucial.com for $300 and let me tell you this laptop soars with 4gb ram. Bottom line if you can get the ram upgrade do it yourself for less its well worth it and its very easy to install.

Sound: Nothing much here, however I did notice when I have my apple ear phones in I often hear static or pops when switching from itunes to adium etc. Nothing to major, but its annoying sometimes.

Video Card: I enjoy playing World of Warcraft often and I am very pleased to say that the new Nvidia 8600M GT 256mb video card apple is using far surpasses the old ATI in the first generation MBP’s. I have yet to try any other games but my play in WOW is much smoother (no lag) and the quality is also very much improved. I don’t do any graphic or movie editing so I cannot comment in that area as far as improvements.

Heat Issues: Compared to the first generation MBP the heat is at least 60% less on the newer model even when running vmware fusion, wow, safari and mail.

Overall my experience with the latest and great MacBook Pro has been outstanding I have no complaints and I hope this laptop will last for some time, it was money well spent 🙂