nginx

Nginx and Mirror on Demand

Tagged in

Just saw Igor Sysoev announced the release of Nginx 0.6.4 on the mailing list, and saw him demonstrating the new proxy_store and fastcgi_store directives (which have been available since 0.6.3), making “mirror on demand” so much easier to do as an developer.

Here is the configuration code Ignor demonstrated in his email:

GoDaddy TurboSSL Certificate on Nginx

Tagged in

Last Sunday I had my first chance of buying an SSL certificate and setting it up on Nginx. Prior to that I have always just signed with my own CA, and then just import my own CA’s certificate into browser’s root certificate repository.

Anyway. What happened was on a website I am developing, I have provided some API via Javascript, so this guy I am partnering with can just include my dynamically generated Javascript to produce content on his site. However, his site runs entirely on HTTPS but mine is not, so you get that dreadful This Page Contains Both Secure and Non-Secure Items error message in some IE versions.

I guess the easiest way for me to fix it up is actually running the site on HTTPS as well. So I went out and bought a certificate from GoDaddy ($18/year — why so much price difference?), but it wasn’t that trivial as GoDaddy does not have any installation instruction for Nginx, which my site is running under. Why not?! Consider Ngnix already has a sizable market penetration (especially if are a Russian malware distributor). Well, here are the steps.

Running Drupal with Clean URL on Nginx or Lighttpd

Tagged in

Drupal Logo First of all, my previous post on Nginx vs. Lighttpd for a small VPS seems to be a “hit”. Thanks to Glenn for submitting it to programming.reddit.com, which got picked up by a few bloggers. Got around 1,000 unique visitors on the day where the post went live, which I guess is pretty good for this one-post-a-week site of mine.

Since I have briefly touched on the “URL rewrite-ability” of Nginx and Lighttpd in my previous post, I think it might actually be useful to have some examples showing how rewrite rules are written on these web servers to support clean URLs. I will take the open source CMS Drupal for example, as it is what Hosting Fu runs on. Btw, Drupal 5.0 has just been released and it rocks.

Nginx vs. Lighttpd for a small VPS

I have been using Lighttpd for almost a year and Nginx for a month on my servers. I know that they were created to be massively scalable, solving the C10k problem. However their asynchronised-IO model and small memory foot-print also make them suitable as alternative HTTP servers for memory-limited VPS. Alternative = Anything but the current defacto Apache.

I will be writing more about Lighttpd and Nginx later during the year, but will try to use this post to draw some comparison between Nginx, the new darling of these light-weight web servers, and Lighttpd, many Web 2.0 developers’ all time favourite.