osbmedia

el blog de thanh

I'm the kind of guy who thrives on challenge and gets bored resting on my considerable laurels. Thus, I chose the blogosphere as the next object of my conquest.

 

PHP-FPM + NGINX + 502 GATEWAY

By Thanh February 16, 2011 Technology, nginx, PHP 0 Comments

OMFG, I spent hours debugging this 502 gateway error. My server is very customized in terms of the way I have my LEMP stack set up. Last night, I decided to run an apt-get upgrade on my box since it’s been awhile. I saw that there were many php packages on the list. So, I went through with it. This morning = FAIL. Woke up early to be greated by the infamous 502 Gateway error. Logs were not helpful at all.

read more

Adding a trailing slash to your URLs on NGINX

By Thanh January 04, 2011 Technology, nginx 0 Comments

I come across this question a lot from people. It’s a simple solution really and I’ll tell you how. Some may ask what’s the point (it works as is with or without)? Well, when it comes to Search Engine Optimization, having duplicate may hurt your rankings. Therefore, it’s good practice to have a permanent (301) redirect for one or the other.

read more

Making wp-ecommerce play nice with nginx

By Thanh October 06, 2010 Projects, Technology, nginx, PHP 0 Comments

Recently, I’ve been working on a new site for a client that required the wp-ecommerce plugin for wordpress. From the install, everything looked fine. As some of you may know, I’ve dumped apache web server for nginx.  I quickly run into a problem with wp-ecommerce’s add to cart function. It seem to hang when you click add to cart.

read more