This blog (and all my other sites) is now running on Nginx

Yes, I finally made the switch from Apache to Nginx. I’ve wanted to do this for a long time. Not that my sites has that many hits/traffic, but just because I wanted to try Nginx out.

It was a pretty straightforward experience to set it up. Now since my old VPS was running Ubuntu 8.04 LTS I figured it was time to upgrade it too, that’s why I went and created a new VPS. So … all I did was basically to:

  • create a new VPS
  • install Ubunbu 10.04 on it
  • install Nginx
  • and PHP
  • and MySQL
  • copy my old www-folder (I used rsync for this, so I quickly could update it just before I went live)
  • import my old mysql-databases (using mysqldump, storing dump in www-folder, and letting rsync pick up it’s changes too)
  • setup server blocks for Nginx and convert the rewrite rules from apache to the format nginx uses. This was far more simple than I expected. Perhaps I cheated a bit by using
  • remove ip-number from old VPS and attach it to the new VPS

Most surprising/cool was the last part when I switched VPS for the IP number. It took just 30 seconds or so to do the switch from one server to another. Pretty cool. No waiting for DNS or similar.

Leave a Reply