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.
- Download nginx source code
- Download HttpHeadersMore module
- Upgrade passenger (sudo gem update passenger)
- Install nginx via passenger (sudo passenger-install-nginx-module); use the advanced setup
- Specify the prefix /usr/local in the installation
- Add options --user=www-data --group=www-data --add-module=/path/to/http-headers-more-module
- 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
- Update /etc/nginx/nginx.conf to reflect the correct version number of passenger
- Consider upgrading WordPress, by downloading the latest version and unzipping it in the /var/www directory (on top of the existing files)