How I set up nginx

This is how I set up nginx. The post is mostly here so I remember what to do the next time around.

  1. Download nginx source code
  2. Download HttpHeadersMore module
  3. Upgrade passenger (sudo gem update passenger)
  4. Install nginx via passenger (sudo passenger-install-nginx-module); use the advanced setup
  5. Specify the prefix /usr/local in the installation
  6. Add options -user=www-data –-group=www-data –-add-module=/path/to/http-headers-more-module
  7. The configure command should look like:
    sh ./configure --prefix='/usr/local' --with-http_ssl_module
      --with-http_gzip_static_module --with-cc-opt='-Wno-error'
      --add-module='/usr/lib/ruby/gems/1.8/gems/passenger-version/ext/nginx'
      --user=www-data --group=www-data
      --add-module=/path/to/http-headers-more-module
  8. Update /etc/nginx/nginx.conf to reflect the correct version number of passenger
  9. Consider upgrading WordPress, by downloading the latest version and unzipping it in the /var/www directory (on top of the existing files)

Comments 1

  • Hi

    Just came here to point out the link to your Git Tutorial is dead. Which is a shame as I thought it was quite good when I read it a while ago. I hope it still exists out there, somewhere in cyberspace, pining for a new link to bring it back into the light.