I’ve been using russian technology for about a week now and it works really well with Rails and is easy to set up in general.

I’d like to thank err for his nginx config generator and Ezra for making me aware of nginx and his config file. This combination got me up and runing with ngnix in about 5 minutes.

However, I needed to modify the generated config file a bit to fit the standard debian file paths and users. So I modified the ERB template which is used to generate the config file. It should be fully backwards compatible, so if you don’t need all of these modifications you could use it and just use the modifications you need. Here’s the template with my modifications

My YAML file looks like this:

user: www-data
group: www-data

pid_path: /var/run/
config_path: /etc/nginx/
log_path: /var/log/nginx_

  1. This defines the default roots and alternate roots.
  2. The name (or key) of your site will be sprintf’d with
  3. the below root, right.
    blog: /srv/hendrikvolkmer.de/blog/public
    www: /var/www
  1. All your vhosts.
server_name: blog.hendrikvolkmer.de
  1. I added a special feeds config which generates the
  2. if ($http_user_agent !~ FeedBurner) line before the actual rewrite
  3. line. Works fine with Mephisto and, of course Feedburner, YMMV
    – ^/feed/atom.xml http://feeds.feedburner.com/hendrikvolkmer
    – ^/feed/all_comments.xml http://feeds.feedburner.com/hendrikvolkmer_comments
root: blog www: root: www server_name: hendrikvolkmer.de

Also, it’s really easy to compile nginx 0.5.20 for Debian: Just download the source, make the necessary modifications to the current deb file specifications and compile. :)

Related Posts