nginx and non document root phpmyadmin

November 6th, 2009

Recently we have been playing around with nginx for a couple of projects we have been working on and I think I have fallen in love with a web server. After using apache for so many years, I did not think that this could be possible, but it is!! For what we are using it for, it is superior in almost every aspect: installation, configuration, speed, memory usage, etc. Not to mention the fact that most of our apache deployments are often tainted by the beast that is cPanel/WHM… The reason I am writing this article is to hopefully alleviate the pain of trying to figure out how to setup phpmyadmin or other such applications in a non-document root setup when you are just learning the ins-and-outs of nginx configuration.

Just a quick tip because it is probably the main stumbling block when learning nginx configuration vs apache configuration; the root directive works differently in nginx. In nginx it will append the directory from the matching location block to the request. Taken from the docs: “so that a request for “/i/top.gif” will not look in “/spool/w3/top.gif” [but in /spool/w3/i/top.gif] like might happen in an Apache-like alias configuration where the location match itself is dropped. Use the alias directive to achieve the Apache-like functionality.” But I digress.

Most of the online documentation and tutorials explain how to get php running globally or how to get phpmyadmin to work from document root, but I had to dig deep to get it to work like www.domain.com/phpmyadmin/ . I didn’t want every .php script to be run as php and I did not want phpmyadmin installed at document root. Here is what I found:


location /phpmyadmin {
    root           /usr/local/nginx/html;
    index          index.php;
}

 location ~ ^/phpmyadmin.+.php$ {
    root          /usr/local/nginx/html;
    fastcgi_pass   127.0.0.1:9000;
    fastcgi_index  index.php;
    fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
    include        fastcgi_params;
}

Read the rest of this entry »

  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • Reddit
  • Slashdot
  • StumbleUpon
  • Technorati
  • Tumblr
  • Twitter

A not so brief history of base-10 design & development inc.

November 2nd, 2009

Not many people know how Base-10 started or where it came from, so I am going to give you a brief history lesson that will shed some light on our origins and how we came to be.

It all started back in 2003 almost 7 years ago… Ramin and I both trained in Kickboxing and attended Champions Martial Arts. Ramin was 19, I was 17 and we were not even good friends at the time, in fact I clearly remember Ramin picking on me. We had been training together for more then 5  years at the time and knew that we were both computer geeks. Ramin was into graphics and 3d rendering and I was into linux system administration; we were both into gaming. This is how we first connected, by fragging and ganking each other in Counter Strike and other such games. One day I was approached by Amin Sabounchi, another member of Champions, asking me if I knew how to make websites because he was interested in getting a new real estate site for his business. I told him what any 17 year old underachiever, wannabe computer hacker would say, “Of course I do!!”. To tell you the truth, I did not know how to make a website, especially a dynamic real estate website.. all I knew was some super basic HTML and the general concepts involved.. I had no programming experience and absolutely no design skills. Armed with nothing but an idea of where to start, I bought a book on Perl (Programming Perl!!) and called up Ramin with a proposition. Read the rest of this entry »

  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • Reddit
  • Slashdot
  • StumbleUpon
  • Technorati
  • Tumblr
  • Twitter

9 Station Pour Over Bar @ Cafca

October 15th, 2009

It just so happens that our office is located within walking distance to probably the most fantastic café in Vancouver (imho). The name of the café is a bit of a mouthful, but well worth the effort to remember: The Café for Contemporary Art or just cafca for short. Last night they hosted an after party for the Vancouver Coffee & Tea show and featured a 9 station pour over bar.

Read the rest of this entry »

  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • Reddit
  • Slashdot
  • StumbleUpon
  • Technorati
  • Tumblr
  • Twitter

Google street view finally comes to Canada

October 9th, 2009

I figured I would join the party in blogging about the launch of Google Street View in Canada. Privacy concerns aside, I think it is a very cool service and will come in handy for all sorts of things. Other then personal uses, we will be integrating it into our real estate sites so that users can check out a house as if they are standing in front of it.

One downside of the service is that you have no control of when or what was taken in the photos. As you can see from this shot of our office there is a huge van in the way =(

  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • Reddit
  • Slashdot
  • StumbleUpon
  • Technorati
  • Tumblr
  • Twitter

Hacking your sleep

October 8th, 2009

I came across an interesting product during my afternoon web wanderings; so interesting in fact, I decided to blog about it. Being somewhat of a geek and coming from a programming/system administration background, I naturally try to optimize my surroundings and myself. Some would call this being a perfectionist or a tad OCD, but I think it is just a healthy urge to make oneself better. Lest I go of on a random tangent, the product I came across today is called the Zeo Personal Sleep Coach.

The Zeo Sleep Coach
Read the rest of this entry »

  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • Reddit
  • Slashdot
  • StumbleUpon
  • Technorati
  • Tumblr
  • Twitter

We are what we work

October 5th, 2009

Capitalism’s language also says that our labor is a commodity to be bought and sold in a competitive marketplace. And it equates our personal identities with our economic roles in the market place. Think, for instance, of the intrinsically bizarre way we describe someone to a stranger. We usually say “He (or she) is an x,” where “x” is the persons profession.

– Thomas Homer-Dixon, The Upside of Down

I have often pondered this, but have been unable to articulate it myself. Capitalism has many pros and many cons, but it is a damn shame we have become defined by our professions. Should we not be defined by who we actually are? By our mannerisms, our temperaments, even our idiosyncrasies? Yes, I know, what we do is very much a part of who we are, but these days it is given far to much emphasis. I would rather be known as funny or a great snowboarder then a business owner or programmer.

  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • Reddit
  • Slashdot
  • StumbleUpon
  • Technorati
  • Tumblr
  • Twitter

Nifty Twitter Tip (Twip?)

September 28th, 2009

It turns out you can easily provide a link for your users to post something to their twitter account; say a link to an interesting blog post or some other such thing.

http://twitter.com/home?status=Check+Out+This+Blog+Post:+http://cli.gs/3ZeD5X

  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • Reddit
  • Slashdot
  • StumbleUpon
  • Technorati
  • Tumblr
  • Twitter

Announcing BaseTools 1.0b

September 24th, 2009

The Build-up:

Modern websites use a lot of javascript to do all sorts of things that used to be reserved for flash; such as carousels, lighbox effects (actually called modal dialogues), fancy menu animations and other such things. We naturally spend a lot of time implementing these features as javascript adds yet another layer that has to be developed, debugged, tested, tweaked, etc. Not to mention having to make it all work in the various browsers, particularly the different flavours of IE. Every development team has a different set of tools that they use when building websites and thankfully there are a miriad of readily available tools out there starting with javascript frameworks (we use JQuery), to the effect libraries and the modules/plugins built on top of them. These packaged tools are a godsend when you need to get something done and don’t have the time to figure out how to do it from scratch. Read the rest of this entry »

  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • Reddit
  • Slashdot
  • StumbleUpon
  • Technorati
  • Tumblr
  • Twitter

Entrepreneur as an artist

September 24th, 2009

I kept thinking that the entrepreneur is like an artist, only business is the means of his expression… He creates [a business] from nothing, just a blank canvas. It’s amazing. Somebody goes into a garage, has nothing but an idea, and out of the garage comes a company, a living company. It’s so special what they do. They are a treasure

– Bernard A. Goldhirsh, founder of Inc. magazine.
(From the final chapters of Small Giants, an incredible business book by Bo Burlingham. )

Sometimes we get so caught up in what we are doing, we forget what we have done.

  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • Reddit
  • Slashdot
  • StumbleUpon
  • Technorati
  • Tumblr
  • Twitter

New updates to an old site

August 24th, 2009

One of the highest traffic sites we have created got a substantial update today; the site I am talking about is Vancitylofts.com. We inherited this site in 2003 in the form of a massive plate of PHP 4 spaghetti code and went through a complete rewrite in 2006. As part of the rewrite we ported the site to perl and the Catalyst web framework. Since then the site has gone through a number of random updates and feature additions and as of today, has finally been brought into the web 2.0 era. Read the rest of this entry »

  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • Reddit
  • Slashdot
  • StumbleUpon
  • Technorati
  • Tumblr
  • Twitter